diff options
author | Fam Zheng <famz@redhat.com> | 2018-01-16 14:09:00 +0800 |
---|---|---|
committer | Fam Zheng <famz@redhat.com> | 2018-02-08 09:22:03 +0800 |
commit | e86de5e4740b45fb73401fec8b87f63ce5775297 (patch) | |
tree | 22556dc6102a087efdae3654948ffa50a939275e | |
parent | a3d9a352d4899a2f3567ae923069ee4a0959c0f4 (diff) | |
download | qemu-e86de5e4740b45fb73401fec8b87f63ce5775297.zip qemu-e86de5e4740b45fb73401fec8b87f63ce5775297.tar.gz qemu-e86de5e4740b45fb73401fec8b87f63ce5775297.tar.bz2 |
docs: Add section for NVMe VFIO driver
Signed-off-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <20180116060901.17413-9-famz@redhat.com>
Signed-off-by: Fam Zheng <famz@redhat.com>
-rw-r--r-- | docs/qemu-block-drivers.texi | 37 | ||||
-rw-r--r-- | qemu-doc.texi | 1 |
2 files changed, 38 insertions, 0 deletions
diff --git a/docs/qemu-block-drivers.texi b/docs/qemu-block-drivers.texi index 503c184..cd74767 100644 --- a/docs/qemu-block-drivers.texi +++ b/docs/qemu-block-drivers.texi @@ -785,6 +785,43 @@ warning: ssh server @code{ssh.example.com:22} does not support fsync With sufficiently new versions of libssh2 and OpenSSH, @code{fsync} is supported. +@node disk_images_nvme +@subsection NVMe disk images + +NVM Express (NVMe) storage controllers can be accessed directly by a userspace +driver in QEMU. This bypasses the host kernel file system and block layers +while retaining QEMU block layer functionalities, such as block jobs, I/O +throttling, image formats, etc. Disk I/O performance is typically higher than +with @code{-drive file=/dev/sda} using either thread pool or linux-aio. + +The controller will be exclusively used by the QEMU process once started. To be +able to share storage between multiple VMs and other applications on the host, +please use the file based protocols. + +Before starting QEMU, bind the host NVMe controller to the host vfio-pci +driver. For example: + +@example +# modprobe vfio-pci +# lspci -n -s 0000:06:0d.0 +06:0d.0 0401: 1102:0002 (rev 08) +# echo 0000:06:0d.0 > /sys/bus/pci/devices/0000:06:0d.0/driver/unbind +# echo 1102 0002 > /sys/bus/pci/drivers/vfio-pci/new_id + +# qemu-system-x86_64 -drive file=nvme://@var{host}:@var{bus}:@var{slot}.@var{func}/@var{namespace} +@end example + +Alternative syntax using properties: + +@example +qemu-system-x86_64 -drive file.driver=nvme,file.device=@var{host}:@var{bus}:@var{slot}.@var{func},file.namespace=@var{namespace} +@end example + +@var{host}:@var{bus}:@var{slot}.@var{func} is the NVMe controller's PCI device +address on the host. + +@var{namespace} is the NVMe namespace number, starting from 1. + @node disk_image_locking @subsection Disk image file locking diff --git a/qemu-doc.texi b/qemu-doc.texi index 19a82bf..769968a 100644 --- a/qemu-doc.texi +++ b/qemu-doc.texi @@ -621,6 +621,7 @@ encrypted disk images. * disk_images_iscsi:: iSCSI LUNs * disk_images_gluster:: GlusterFS disk images * disk_images_ssh:: Secure Shell (ssh) disk images +* disk_images_nvme:: NVMe userspace driver * disk_image_locking:: Disk image file locking @end menu |