xref: /qemu/docs/system/devices/vfio-user.rst (revision aec6836c73403cffa56b9a4c5556451ee16071fe)
1.. SPDX-License-Identifier: GPL-2.0-or-later
2
3=========
4vfio-user
5=========
6
7QEMU includes a ``vfio-user`` client. The ``vfio-user`` specification allows for
8implementing (PCI) devices in userspace outside of QEMU; it is similar to
9``vhost-user`` in this respect (see :doc:`vhost-user`), but can emulate arbitrary
10PCI devices, not just ``virtio``. Whereas ``vfio`` is handled by the host
11kernel, ``vfio-user``, while similar in implementation, is handled entirely in
12userspace.
13
14For example, SPDK includes a virtual PCI NVMe controller implementation; by
15setting up a ``vfio-user`` UNIX socket between QEMU and SPDK, a VM can send NVMe
16I/O to the SPDK process.
17
18Presuming a suitable ``vfio-user`` server has opened a socket at
19``/tmp/vfio-user.sock``, a device can be configured with for example:
20
21.. code-block:: console
22
23-device '{"driver": "vfio-user-pci","socket": {"path": "/tmp/vfio-user.sock", "type": "unix"}}'
24
25See `libvfio-user <https://github.com/nutanix/libvfio-user/>`_ for further
26information.
27