[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 8/8] virtio-blk: fill in the feature table
From: |
Jesse Larrew |
Subject: |
[Qemu-devel] [PATCH 8/8] virtio-blk: fill in the feature table |
Date: |
Tue, 19 Feb 2013 17:04:53 -0600 |
Fill in the feature table with the last field of struct virtio_blk_config
at the time that the feature flag was introduced. The table was constructed
by searching through the git history.
Signed-off-by: Jesse Larrew <address@hidden>
---
hw/virtio-blk.c | 22 ++++++++++++++++++++--
1 file changed, 20 insertions(+), 2 deletions(-)
diff --git a/hw/virtio-blk.c b/hw/virtio-blk.c
index 788a4c7..47c57d8 100644
--- a/hw/virtio-blk.c
+++ b/hw/virtio-blk.c
@@ -26,8 +26,26 @@
#endif
static VirtIOFeature feature_sizes[] = {
- {.flags = 0xffffffff, /* dummy table -- all features included */
- .end = sizeof(struct virtio_blk_config)},
+ {.flags = 1 << VIRTIO_BLK_F_BARRIER,
+ .end = endof(struct virtio_blk_config, sectors)},
+ {.flags = 1 << VIRTIO_BLK_F_SIZE_MAX,
+ .end = endof(struct virtio_blk_config, sectors)},
+ {.flags = 1 << VIRTIO_BLK_F_SEG_MAX,
+ .end = endof(struct virtio_blk_config, sectors)},
+ {.flags = 1 << VIRTIO_BLK_F_GEOMETRY,
+ .end = endof(struct virtio_blk_config, sectors)},
+ {.flags = 1 << VIRTIO_BLK_F_RO,
+ .end = endof(struct virtio_blk_config, sectors)},
+ {.flags = 1 << VIRTIO_BLK_F_BLK_SIZE,
+ .end = endof(struct virtio_blk_config, sectors)},
+ {.flags = 1 << VIRTIO_BLK_F_SCSI,
+ .end = endof(struct virtio_blk_config, sectors)},
+ {.flags = 1 << VIRTIO_BLK_F_WCE,
+ .end = endof(struct virtio_blk_config, blk_size)},
+ {.flags = 1 << VIRTIO_BLK_F_TOPOLOGY,
+ .end = endof(struct virtio_blk_config, opt_io_size)},
+ {.flags = 1 << VIRTIO_BLK_F_CONFIG_WCE,
+ .end = endof(struct virtio_blk_config, wce)},
{}
};
--
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, 2013/02/19
- [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 <=