diff options
author | John Levon <john.levon@nutanix.com> | 2025-06-25 20:30:10 +0100 |
---|---|---|
committer | Cédric Le Goater <clg@redhat.com> | 2025-06-26 08:55:38 +0200 |
commit | c688cc165b32c924a01a69d90ac9aac6fac8c64c (patch) | |
tree | 754bc6d5a86c0ea48ba60c74a0f9dbb3a9487748 | |
parent | 1a0c32a9daa39738fffc7de086845b2e54ae7034 (diff) | |
download | qemu-c688cc165b32c924a01a69d90ac9aac6fac8c64c.zip qemu-c688cc165b32c924a01a69d90ac9aac6fac8c64c.tar.gz qemu-c688cc165b32c924a01a69d90ac9aac6fac8c64c.tar.bz2 |
docs: add vfio-user documentation
Add some basic documentation on vfio-user usage.
Signed-off-by: John Levon <john.levon@nutanix.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20250625193012.2316242-19-john.levon@nutanix.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
-rw-r--r-- | docs/system/device-emulation.rst | 1 | ||||
-rw-r--r-- | docs/system/devices/vfio-user.rst | 26 |
2 files changed, 27 insertions, 0 deletions
diff --git a/docs/system/device-emulation.rst b/docs/system/device-emulation.rst index a1b0d79..9113816 100644 --- a/docs/system/device-emulation.rst +++ b/docs/system/device-emulation.rst @@ -85,6 +85,7 @@ Emulated Devices devices/can.rst devices/ccid.rst devices/cxl.rst + devices/vfio-user.rst devices/ivshmem.rst devices/ivshmem-flat.rst devices/keyboard.rst diff --git a/docs/system/devices/vfio-user.rst b/docs/system/devices/vfio-user.rst new file mode 100644 index 0000000..b6dcaa5 --- /dev/null +++ b/docs/system/devices/vfio-user.rst @@ -0,0 +1,26 @@ +.. SPDX-License-Identifier: GPL-2.0-or-later + +========= +vfio-user +========= + +QEMU includes a ``vfio-user`` client. The ``vfio-user`` specification allows for +implementing (PCI) devices in userspace outside of QEMU; it is similar to +``vhost-user`` in this respect (see :doc:`vhost-user`), but can emulate arbitrary +PCI devices, not just ``virtio``. Whereas ``vfio`` is handled by the host +kernel, ``vfio-user``, while similar in implementation, is handled entirely in +userspace. + +For example, SPDK includes a virtual PCI NVMe controller implementation; by +setting up a ``vfio-user`` UNIX socket between QEMU and SPDK, a VM can send NVMe +I/O to the SPDK process. + +Presuming a suitable ``vfio-user`` server has opened a socket at +``/tmp/vfio-user.sock``, a device can be configured with for example: + +.. code-block:: console + +-device '{"driver": "vfio-user-pci","socket": {"path": "/tmp/vfio-user.sock", "type": "unix"}}' + +See `libvfio-user <https://github.com/nutanix/libvfio-user/>`_ for further +information. |