aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/devel/migration/main.rst6
-rw-r--r--docs/interop/vhost-user.rst6
-rw-r--r--docs/system/device-emulation.rst1
-rw-r--r--docs/system/devices/cxl.rst3
-rw-r--r--docs/system/devices/vhost-user-input.rst45
-rw-r--r--docs/system/devices/vhost-user-rng.rst2
-rw-r--r--docs/system/devices/vhost-user.rst72
7 files changed, 127 insertions, 8 deletions
diff --git a/docs/devel/migration/main.rst b/docs/devel/migration/main.rst
index 00b9c3d..331252a 100644
--- a/docs/devel/migration/main.rst
+++ b/docs/devel/migration/main.rst
@@ -431,10 +431,10 @@ data doesn't match the stored device data well; it allows an
intermediate temporary structure to be populated with migration
data and then transferred to the main structure.
-If you use memory API functions that update memory layout outside
+If you use memory or portio_list API functions that update memory layout outside
initialization (i.e., in response to a guest action), this is a strong
indication that you need to call these functions in a ``post_load`` callback.
-Examples of such memory API functions are:
+Examples of such API functions are:
- memory_region_add_subregion()
- memory_region_del_subregion()
@@ -443,6 +443,8 @@ Examples of such memory API functions are:
- memory_region_set_enabled()
- memory_region_set_address()
- memory_region_set_alias_offset()
+ - portio_list_set_address()
+ - portio_list_set_enabled()
Iterative device migration
--------------------------
diff --git a/docs/interop/vhost-user.rst b/docs/interop/vhost-user.rst
index 9f1103f..ad6e142 100644
--- a/docs/interop/vhost-user.rst
+++ b/docs/interop/vhost-user.rst
@@ -148,9 +148,9 @@ Vring descriptor indices for packed virtqueues
A vring address description
^^^^^^^^^^^^^^^^^^^^^^^^^^^
-+-------+-------+------+------------+------+-----------+-----+
-| index | flags | size | descriptor | used | available | log |
-+-------+-------+------+------------+------+-----------+-----+
++-------+-------+------------+------+-----------+-----+
+| index | flags | descriptor | used | available | log |
++-------+-------+------------+------+-----------+-----+
:index: a 32-bit vring index
diff --git a/docs/system/device-emulation.rst b/docs/system/device-emulation.rst
index d1f3277..f197774 100644
--- a/docs/system/device-emulation.rst
+++ b/docs/system/device-emulation.rst
@@ -94,6 +94,7 @@ Emulated Devices
devices/virtio-gpu.rst
devices/virtio-pmem.rst
devices/virtio-snd.rst
+ devices/vhost-user-input.rst
devices/vhost-user-rng.rst
devices/canokey.rst
devices/usb-u2f.rst
diff --git a/docs/system/devices/cxl.rst b/docs/system/devices/cxl.rst
index 6ab5f72..10a0e9b 100644
--- a/docs/system/devices/cxl.rst
+++ b/docs/system/devices/cxl.rst
@@ -411,5 +411,4 @@ References
- Consortium website for specifications etc:
http://www.computeexpresslink.org
- - Compute Express link Revision 2 specification, October 2020
- - CEDT CFMWS & QTG _DSM ECN May 2021
+ - Compute Express Link (CXL) Specification, Revision 3.1, August 2023
diff --git a/docs/system/devices/vhost-user-input.rst b/docs/system/devices/vhost-user-input.rst
new file mode 100644
index 0000000..118eb78
--- /dev/null
+++ b/docs/system/devices/vhost-user-input.rst
@@ -0,0 +1,45 @@
+.. _vhost_user_input:
+
+QEMU vhost-user-input - Input emulation
+=======================================
+
+This document describes the setup and usage of the Virtio input device.
+The Virtio input device is a paravirtualized device for input events.
+
+Description
+-----------
+
+The vhost-user-input device implementation was designed to work with a daemon
+polling on input devices and passes input events to the guest.
+
+QEMU provides a backend implementation in contrib/vhost-user-input.
+
+Linux kernel support
+--------------------
+
+Virtio input requires a guest Linux kernel built with the
+``CONFIG_VIRTIO_INPUT`` option.
+
+Examples
+--------
+
+The backend daemon should be started first:
+
+::
+
+ host# vhost-user-input --socket-path=input.sock \
+ --evdev-path=/dev/input/event17
+
+The QEMU invocation needs to create a chardev socket to communicate with the
+backend daemon and access the VirtIO queues with the guest over the
+:ref:`shared memory <shared_memory_object>`.
+
+::
+
+ host# qemu-system \
+ -chardev socket,path=/tmp/input.sock,id=mouse0 \
+ -device vhost-user-input-pci,chardev=mouse0 \
+ -m 4096 \
+ -object memory-backend-file,id=mem,size=4G,mem-path=/dev/shm,share=on \
+ -numa node,memdev=mem \
+ ...
diff --git a/docs/system/devices/vhost-user-rng.rst b/docs/system/devices/vhost-user-rng.rst
index a145d41..ead1405 100644
--- a/docs/system/devices/vhost-user-rng.rst
+++ b/docs/system/devices/vhost-user-rng.rst
@@ -1,3 +1,5 @@
+.. _vhost_user_rng:
+
QEMU vhost-user-rng - RNG emulation
===================================
diff --git a/docs/system/devices/vhost-user.rst b/docs/system/devices/vhost-user.rst
index a80e95a..9b2da10 100644
--- a/docs/system/devices/vhost-user.rst
+++ b/docs/system/devices/vhost-user.rst
@@ -8,13 +8,81 @@ outside of QEMU itself. To do this there are a number of things
required.
vhost-user device
-===================
+=================
These are simple stub devices that ensure the VirtIO device is visible
to the guest. The code is mostly boilerplate although each device has
a ``chardev`` option which specifies the ID of the ``--chardev``
device that connects via a socket to the vhost-user *daemon*.
+Each device will have an virtio-mmio and virtio-pci variant. See your
+platform details for what sort of virtio bus to use.
+
+.. list-table:: vhost-user devices
+ :widths: 20 20 60
+ :header-rows: 1
+
+ * - Device
+ - Type
+ - Notes
+ * - vhost-user-blk
+ - Block storage
+ - See contrib/vhost-user-blk
+ * - vhost-user-fs
+ - File based storage driver
+ - See https://gitlab.com/virtio-fs/virtiofsd
+ * - vhost-user-gpio
+ - Proxy gpio pins to host
+ - See https://github.com/rust-vmm/vhost-device
+ * - vhost-user-gpu
+ - GPU driver
+ - See contrib/vhost-user-gpu
+ * - vhost-user-i2c
+ - Proxy i2c devices to host
+ - See https://github.com/rust-vmm/vhost-device
+ * - vhost-user-input
+ - Generic input driver
+ - :ref:`vhost_user_input`
+ * - vhost-user-rng
+ - Entropy driver
+ - :ref:`vhost_user_rng`
+ * - vhost-user-scmi
+ - System Control and Management Interface
+ - See https://github.com/rust-vmm/vhost-device
+ * - vhost-user-snd
+ - Audio device
+ - See https://github.com/rust-vmm/vhost-device/staging
+ * - vhost-user-scsi
+ - SCSI based storage
+ - See contrib/vhost-user-scsi
+ * - vhost-user-vsock
+ - Socket based communication
+ - See https://github.com/rust-vmm/vhost-device
+
+The referenced *daemons* are not exhaustive, any conforming backend
+implementing the device and using the vhost-user protocol should work.
+
+vhost-user-device
+^^^^^^^^^^^^^^^^^
+
+The vhost-user-device is a generic development device intended for
+expert use while developing new backends. The user needs to specify
+all the required parameters including:
+
+ - Device ``virtio-id``
+ - The ``num_vqs`` it needs and their ``vq_size``
+ - The ``config_size`` if needed
+
+.. note::
+ To prevent user confusion you cannot currently instantiate
+ vhost-user-device without first patching out::
+
+ /* Reason: stop inexperienced users confusing themselves */
+ dc->user_creatable = false;
+
+ in ``vhost-user-device.c`` and ``vhost-user-device-pci.c`` file and
+ rebuilding.
+
vhost-user daemon
=================
@@ -23,6 +91,8 @@ following the :ref:`vhost_user_proto`. There are a number of daemons
that can be built when enabled by the project although any daemon that
meets the specification for a given device can be used.
+.. _shared_memory_object:
+
Shared memory object
====================