diff options
author | Sam Li <faithilikerun@gmail.com> | 2023-05-08 13:19:13 +0800 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2023-05-15 08:18:10 -0400 |
commit | 4f7366506a96c862c796d4ea1913110d9c341e7d (patch) | |
tree | 3374f38968c1b615e272ae9603812357fd335d17 /hw/virtio | |
parent | 6c811e19bb61213cf62018dc137036603af71ad0 (diff) | |
download | qemu-4f7366506a96c862c796d4ea1913110d9c341e7d.zip qemu-4f7366506a96c862c796d4ea1913110d9c341e7d.tar.gz qemu-4f7366506a96c862c796d4ea1913110d9c341e7d.tar.bz2 |
virtio-blk: add zoned storage emulation for zoned devices
This patch extends virtio-blk emulation to handle zoned device commands
by calling the new block layer APIs to perform zoned device I/O on
behalf of the guest. It supports Report Zone, four zone oparations (open,
close, finish, reset), and Append Zone.
The VIRTIO_BLK_F_ZONED feature bit will only be set if the host does
support zoned block devices. Regular block devices(conventional zones)
will not be set.
The guest os can use blktests, fio to test those commands on zoned devices.
Furthermore, using zonefs to test zone append write is also supported.
Signed-off-by: Sam Li <faithilikerun@gmail.com>
Message-id: 20230508051916.178322-2-faithilikerun@gmail.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'hw/virtio')
-rw-r--r-- | hw/virtio/virtio-qmp.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/virtio/virtio-qmp.c b/hw/virtio/virtio-qmp.c index b70148a..e84316d 100644 --- a/hw/virtio/virtio-qmp.c +++ b/hw/virtio/virtio-qmp.c @@ -176,6 +176,8 @@ static const qmp_virtio_feature_map_t virtio_blk_feature_map[] = { "VIRTIO_BLK_F_DISCARD: Discard command supported"), FEATURE_ENTRY(VIRTIO_BLK_F_WRITE_ZEROES, \ "VIRTIO_BLK_F_WRITE_ZEROES: Write zeroes command supported"), + FEATURE_ENTRY(VIRTIO_BLK_F_ZONED, \ + "VIRTIO_BLK_F_ZONED: Zoned block devices"), #ifndef VIRTIO_BLK_NO_LEGACY FEATURE_ENTRY(VIRTIO_BLK_F_BARRIER, \ "VIRTIO_BLK_F_BARRIER: Request barriers supported"), |