qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 7/8] virtio-scsi: fill in table of feature sizes


From: Jesse Larrew
Subject: [Qemu-devel] [PATCH 7/8] virtio-scsi: fill in table of feature sizes
Date: Tue, 19 Feb 2013 17:04:52 -0600

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 <address@hidden>
---
 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]