scsi-disk: rd/wr/vr-protect !=0 is an error
commit96bdbbab55976b106f9db2b61042ebf5f0493e5a
authorRonnie Sahlberg <ronniesahlberg@gmail.com>
Thu, 12 Jul 2012 00:19:38 +0000 (12 10:19 +1000)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 26 Jul 2012 15:44:10 +0000 (26 17:44 +0200)
tree6795107821c66af1a125e55b2952c277f5608ecf
parent96c91bbf6090b3098db22ed19ab5ae2f9c6e4f16
scsi-disk: rd/wr/vr-protect !=0 is an error

The QEMU SCSI emulation does not support protection information,
so any READ/WRITE/VERIFY commands that has the protect bits set to
non-zero should fail with ILLEGAL_REQUEST/INVALID_FIELD_IN_CDB

From SCSI SBC :
If the logical unit does not support protection information,
then the device server should terminate the command with CHECK CONDITION
status with the sense key set to ILLEGAL REQUEST and the additional sense
code set to INVALID FIELD IN CDB.

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
[ Rebase after scsi_dma_reqops introduction - Paolo ]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
hw/scsi-disk.c