This is my version of Daniel's patch. In order to keep the RD/WRPROTECT check for emulated SCSI disks, I've added a new property to scsi-disk/hd/cd devices as well. The property, similar to the earlier versions posted by Daniel, is available to the user, but for scsi-disk/hd/cd it affects the INQUIRY value returned by the emulated INQUIRY command.
Daniel, can you please test it? Thanks, Paolo Daniel Henrique Barboza (1): hw/scsi: support SCSI-2 passthrough without PI Paolo Bonzini (1): scsi-disk: allow customizing the SCSI version hw/scsi/scsi-disk.c | 29 ++++++++++++++++++++++++----- hw/scsi/scsi-generic.c | 48 +++++++++++++++++++++++++++++++++++++----------- include/hw/scsi/scsi.h | 2 ++ 3 files changed, 63 insertions(+), 16 deletions(-) -- 2.16.2