Since none of the existing feature bits changed the layout of struct VirtIOSCSIConf, set the minimum struct size to use the full struct (i.e endof(struct VirtIOSCSIConf, cmd_per_lun)).
Signed-off-by: Jesse Larrew <jlar...@linux.vnet.ibm.com> --- hw/virtio-scsi.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/hw/virtio-scsi.c b/hw/virtio-scsi.c index 6c92975..4a0be44 100644 --- a/hw/virtio-scsi.c +++ b/hw/virtio-scsi.c @@ -18,8 +18,12 @@ #include <hw/scsi-defs.h> static VirtIOFeature feature_sizes[] = { - {.flags = 0xffffffff, - .end = sizeof(struct VirtIOSCSIConf)}, + {.flags = 1 << VIRTIO_SCSI_F_INOUT, + .end = endof(struct VirtIOSCSIConf, cmd_per_lun)}, + {.flags = 1 << VIRTIO_SCSI_F_HOTPLUG, + .end = endof(struct VirtIOSCSIConf, cmd_per_lun)}, + {.flags = 1 << VIRTIO_SCSI_F_CHANGE, + .end = endof(struct VirtIOSCSIConf, cmd_per_lun)}, {} }; -- 1.7.11.7