On 27/03/2018 23:14, Daniel Henrique Barboza wrote: > /* We get here only for BYTCHK == 0x01 and only for scsi-block. > * As far as DMA is concerned, we can treat it the same as a write; > * scsi_block_do_sgio will send VERIFY commands. > + * > + * For scsi versions 2 and older, the BYTCHK isn't related > + * to VRPROTECT (in fact, there is no VRPROTECT). Skip > + * this check in these versions. > */ > - if (r->req.cmd.buf[1] & 0xe0) { > + if ((r->req.cmd.buf[1] & 0xe0) && (s->qdev.scsi_version > 2)) { > goto illegal_request; > }
This also has to check for "s->qdev.scsi_version != -1" so that the behavior of emulated SCSI isn't changed (they claim SPC-3). I made this change and queued the patch. Paolo