qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v2 3/7] docs: document non-net VHOST_USER_GET_FEATURES behavior


From: Stefan Hajnoczi
Subject: [PATCH v2 3/7] docs: document non-net VHOST_USER_GET_FEATURES behavior
Date: Tue, 9 Jun 2020 18:02:14 +0100

QEMU enabled several feature bits for non-net devices without allowing
the device backend to control them. This only works when the device
backend implements support for those features. It won't work for new
features like the packed virtqueue layout, where proper feature
negotiation will be needed.

Document the legacy behavior and specify that device backends must
report features so that we can avoid problems in the future.

Cc: Ben Walker <benjamin.walker@intel.com>
Cc: Sebastien Boeuf <sebastien.boeuf@intel.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
CCing SPDK and cloud-hypervisor folks in case they are affected. DPDK
isn't affected since vhost-user-net performs full feature negotiation.
---
 docs/interop/vhost-user.rst | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/docs/interop/vhost-user.rst b/docs/interop/vhost-user.rst
index 3b1b6602c7..dfadee411d 100644
--- a/docs/interop/vhost-user.rst
+++ b/docs/interop/vhost-user.rst
@@ -290,6 +290,27 @@ bit was dedicated for this purpose::
 
   #define VHOST_USER_F_PROTOCOL_FEATURES 30
 
+Feature negotiation
+-------------------
+The master fetches features from the backend using the
+``VHOST_USER_GET_FEATURES`` message. The feature bits correspond to those from
+the virtio specification, VHOST_F_LOG_ALL (26), and
+``VHOST_USER_F_PROTOCOL_FEATURES`` (30).
+
+Backends must report all supported feature bits. If a feature bit is set then
+the master may set it in the ``VHOST_USER_SET_FEATURES`` message. If a feature
+bit is cleared then the master must not set it in the
+``VHOST_USER_SET_FEATURES`` message.
+
+For devices other than the networking device, masters may assume the following
+feature bits are always set in ``VHOST_USER_GET_FEATURES`` for compatibility
+with legacy backend implementations that do not report them correctly:
+* ``VIRTIO_F_RING_INDIRECT_DESC``
+* ``VIRTIO_F_RING_EVENT_IDX``
+* ``VIRTIO_F_VERSION_1``
+* ``VIRTIO_F_NOTIFY_ON_EMPTY``
+* ``VIRTIO_F_ANY_LAYOUT``
+
 Starting and stopping rings
 ---------------------------
 
-- 
2.26.2


reply via email to

[Prev in Thread] Current Thread [Next in Thread]