scsi-disk: allow customizing the SCSI version

We would like to have different behavior for passthrough devices
depending on the SCSI version they expose.  To prepare for that,
allow the user of emulated devices to specify the desired SCSI
level, and adjust the emulation according to the property value.
The next patch will set the level for scsi-block and scsi-generic
devices.

Based on a patch by Daniel Henrique Barboza
<danielhb@linux.vnet.ibm.com>.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Paolo Bonzini 2018-04-05 18:09:51 +02:00
parent 37c5174189
commit 2343be0d7e
3 changed files with 27 additions and 5 deletions

View file

@ -85,6 +85,8 @@ struct SCSIDevice
uint64_t max_lba;
uint64_t wwn;
uint64_t port_wwn;
int scsi_version;
int default_scsi_version;
};
extern const VMStateDescription vmstate_scsi_device;