@@ -31,6 +31,7 @@ static const int kernel_feature_bits[] = {
VIRTIO_RING_F_INDIRECT_DESC,
VIRTIO_RING_F_EVENT_IDX,
VIRTIO_SCSI_F_HOTPLUG,
+ VIRTIO_SCSI_F_T10_PI,
VHOST_INVALID_FEATURE_BIT
};
@@ -887,6 +887,9 @@ static void virtio_scsi_device_realize(DeviceState *dev, Error **errp)
return;
}
+ /* Protection information is not supported yet. */
+ vdev->guest_features &= ~VIRTIO_SCSI_F_T10_PI;
+
scsi_bus_new(&s->bus, sizeof(s->bus), dev,
&virtio_scsi_scsi_info, vdev->bus_name);
/* override default SCSI bus hotplug-handler, with virtio-scsi's one */
@@ -1200,6 +1200,8 @@ static Property vhost_scsi_pci_properties[] = {
DEV_NVECTORS_UNSPECIFIED),
DEFINE_PROP_BIT("hotplug", VirtIOPCIProxy, host_features,
VIRTIO_SCSI_F_HOTPLUG, true),
+ DEFINE_PROP_BIT("prot_info", VirtIOPCIProxy, host_features,
+ VIRTIO_SCSI_F_T10_PI, true),
DEFINE_PROP_END_OF_LIST(),
};
@@ -315,7 +315,18 @@ bool e820_get_entry(int, uint32_t, uint64_t *, uint64_t *);
.driver = "virtio-scsi-pci",\
.property = "any_layout",\
.value = "off",\
- },{\
+ },\
+ {\
+ .driver = "virtio-scsi-pci",\
+ .property = "prot_info",\
+ .value = "off",\
+ },\
+ {\
+ .driver = "vhost-scsi-pci",\
+ .property = "prot_info",\
+ .value = "off",\
+ },\
+ {\
.driver = "PIIX4_PM",\
.property = "memory-hotplug-support",\
.value = "off",\
@@ -36,6 +36,7 @@
#define VIRTIO_SCSI_F_INOUT 0
#define VIRTIO_SCSI_F_HOTPLUG 1
#define VIRTIO_SCSI_F_CHANGE 2
+#define VIRTIO_SCSI_F_T10_PI 3
#define VIRTIO_SCSI_VQ_SIZE 128
#define VIRTIO_SCSI_CDB_SIZE 32
@@ -258,7 +259,9 @@ QEMU_BUILD_BUG_ON(offsetof(VirtIOSCSIReq, req.cdb) !=
DEFINE_PROP_BIT("hotplug", _state, _feature_field, VIRTIO_SCSI_F_HOTPLUG, \
true), \
DEFINE_PROP_BIT("param_change", _state, _feature_field, \
- VIRTIO_SCSI_F_CHANGE, true)
+ VIRTIO_SCSI_F_CHANGE, true), \
+ DEFINE_PROP_BIT("prot_info", _state, _feature_field, \
+ VIRTIO_SCSI_F_T10_PI, true)
typedef void (*HandleOutput)(VirtIODevice *, VirtQueue *);