[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
- [Qemu-devel] [PATCH v2 0/8] virtio: set config size using host features, Jesse Larrew, 2013/02/19
- [Qemu-devel] [PATCH 3/8] virtio: pass host features to driver init functions, Jesse Larrew, 2013/02/19
- [Qemu-devel] [PATCH 1/8] virtio-net: replace redundant config_size field with config_len, Jesse Larrew, 2013/02/19
- [Qemu-devel] [PATCH 4/8] virtio: set config size using host features, Jesse Larrew, 2013/02/19
- [Qemu-devel] [PATCH 2/8] virtio: put struct VirtIOFeature in a header, Jesse Larrew, 2013/02/19
- [Qemu-devel] [PATCH 6/8] virtio-serial: fill in the feature table, Jesse Larrew, 2013/02/19
- [Qemu-devel] [PATCH 7/8] virtio-scsi: fill in table of feature sizes,
Jesse Larrew <=
- [Qemu-devel] [PATCH 5/8] virtio-balloon: fill in the table of feature_sizes, Jesse Larrew, 2013/02/19
- [Qemu-devel] [PATCH 8/8] virtio-blk: fill in the feature table, Jesse Larrew, 2013/02/19