aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorSam Li <faithilikerun@gmail.com>2023-05-08 13:19:16 +0800
committerStefan Hajnoczi <stefanha@redhat.com>2023-05-15 08:19:04 -0400
commit01562fee5f3ad4506d57dbcf4b1903b565eceec7 (patch)
tree6f1cffee7e87477e85c04526584e7e1b1c23d214 /docs
parent4e92acf74d7cc396a8b4673e38861512fd29b94c (diff)
docs/zoned-storage:add zoned emulation use case
Add the documentation about the example of using virtio-blk driver to pass the zoned block devices through to the guest. Signed-off-by: Sam Li <faithilikerun@gmail.com> Message-id: 20230508051916.178322-5-faithilikerun@gmail.com [Fix pre-formatted code syntax --Stefan] Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'docs')
-rw-r--r--docs/devel/zoned-storage.rst19
1 files changed, 19 insertions, 0 deletions
diff --git a/docs/devel/zoned-storage.rst b/docs/devel/zoned-storage.rst
index da78db2783..30296d3c85 100644
--- a/docs/devel/zoned-storage.rst
+++ b/docs/devel/zoned-storage.rst
@@ -41,3 +41,22 @@ APIs for zoned storage emulation or testing.
For example, to test zone_report on a null_blk device using qemu-io is::
$ path/to/qemu-io --image-opts -n driver=host_device,filename=/dev/nullb0 -c "zrp offset nr_zones"
+
+To expose the host's zoned block device through virtio-blk, the command line
+can be (includes the -device parameter)::
+
+ -blockdev node-name=drive0,driver=host_device,filename=/dev/nullb0,cache.direct=on \
+ -device virtio-blk-pci,drive=drive0
+
+Or only use the -drive parameter::
+
+ -driver driver=host_device,file=/dev/nullb0,if=virtio,cache.direct=on
+
+Additionally, QEMU has several ways of supporting zoned storage, including:
+(1) Using virtio-scsi: --device scsi-block allows for the passing through of
+SCSI ZBC devices, enabling the attachment of ZBC or ZAC HDDs to QEMU.
+(2) PCI device pass-through: While NVMe ZNS emulation is available for testing
+purposes, it cannot yet pass through a zoned device from the host. To pass on
+the NVMe ZNS device to the guest, use VFIO PCI pass the entire NVMe PCI adapter
+through to the guest. Likewise, an HDD HBA can be passed on to QEMU all HDDs
+attached to the HBA.