On 16/11/2026 13:51, Philippe Mathieu-Daudé wrote:
Hi Phil,
Hi Mark,
On 16/11/26 12:48, Mark Cave-Ayland wrote:
The vfio-user protocol specification currently lists each individual
capability
as being optional and provides an indication of the default value
within the
description text.
Clarify that all VFIO_USER_VERSION capabilities are optional
(including if no
capabilities are provided in "version data")
What happens in if "version data" is empty?
It means that no capabilities have been provided. The existing
documentation at
https://www.qemu.org/docs/master/interop/vfio-user.html#request is
fairly clear that both these fields are optional.
However...
and move the default values to
their own separate column within the capabilities table to make them more
visible.
Signed-off-by: Mark Cave-Ayland <[email protected]>
---
docs/interop/vfio-user.rst | 61 +++++++++++++++++++-------------------
1 file changed, 30 insertions(+), 31 deletions(-)
diff --git a/docs/interop/vfio-user.rst b/docs/interop/vfio-user.rst
index b49781a755..4a5cfbb704 100644
--- a/docs/interop/vfio-user.rst
+++ b/docs/interop/vfio-user.rst
@@ -515,37 +515,36 @@ format:
Capabilities:
-+--------------------+---------
+-----------------------------------------------+
-| Name | Type |
Description |
-
+====================+=========+===============================================+
-| max_msg_fds | number | Maximum number of file descriptors
that can |
-| | | be received by the sender in one
message. |
-| | | Optional. If not specified then the
receiver |
-| | | must assume a value of
``1``. |
-+--------------------+---------
+-----------------------------------------------+
-| max_data_xfer_size | number | Maximum ``count`` for data transfer
messages; |
-| | | see `Read and Write Operations`_.
Optional, |
-| | | with a default value of 1048576
bytes. |
-+--------------------+---------
+-----------------------------------------------+
-| max_dma_maps | number | Maximum number DMA map windows that
can be |
-| | | valid simultaneously. Optional,
with a |
-| | | value of 65535
(64k-1). |
-+--------------------+---------
+-----------------------------------------------+
-| pgsizes | number | Page sizes supported in DMA map
operations |
-| | | or'ed together. Optional, with a
default |
-| | | value of supporting only 4k
pages. |
-+--------------------+---------
+-----------------------------------------------+
-| twin_socket | object | Parameters for twin-socket mode,
which |
-| | | handles server-to-client commands
and their |
-| | | replies on a separate socket.
Optional. |
-+--------------------+---------
+-----------------------------------------------+
-| write_multiple | boolean | ``VFIO_USER_REGION_WRITE_MULTI``
messages |
-| | | are supported if the value is
``true``. |
-+--------------------+---------
+-----------------------------------------------+
-| sparse_mmap_fds | boolean |
``VFIO_REGION_INFO_CAP_SPARSE_MMAP_FDS`` |
-| | | capability is supported if the value
is |
-| | |
``true``. |
-+--------------------+---------
+-----------------------------------------------+
+All capabilties are optional. If a capability is not included in the
request
... I added this extra paragraph to emphasise this behaviour if
capabilities are not provided.
Typo "capabilities".
Ooops, will fix in v2.
+sent by the client, the server should assume the default values
specified in
The "must" -> "should" change should be justified.
I'm not sure what you mean - this paragraph is completely new? Or are
you saying I should use "must" instead?
+the table below:
+
++--------------------+---------+--------------------------
+-----------------------------------------------+
+| Name | Type | Default (if unspecified) |
Description |
+
+====================+=========+==========================+===============================================+
+| max_msg_fds | number | ``1`` | Maximum
number of file descriptors that can |
+| | | | be
received by the sender in one message. |
++--------------------+---------+--------------------------
+-----------------------------------------------+
+| max_data_xfer_size | number | ``1048576`` | Maximum
``count`` in bytes for data transfer |
+| | | | messages;
see `Read and Write Operations`_. |
++--------------------+---------+--------------------------
+-----------------------------------------------+
+| max_dma_maps | number | ``65535`` (64k-1) | Maximum
number DMA map windows that can be |
+| | | | valid
simultaneously. |
Pre-exiting, "64 KiB - 1" is more accurate.
Okay I'll change from 64-1 to 64 KiB - 1.
Previous was optional, now default is always present. Can we clarify?
I'm fairly sure "Optional, with a value of 65535 (64k-1)" is intending
to express the default value if none is supplied. John/Thanos - please
confirm that I've got this correct.
But indeed, you've spotted some of the ambiguities that this patch is
intended to resolve :)
++--------------------+---------+--------------------------
+-----------------------------------------------+
+| pgsizes | number | ``4096`` (4k pages only) | Page
sizes supported in DMA map operations |
+| | | | or'ed
together. |
++--------------------+---------+--------------------------
+-----------------------------------------------+
+| twin_socket | object | (empty) |
Parameters for twin-socket mode, which |
+| | | | handles
server-to-client commands and their |
+| | | | replies
on a separate socket. |
"empty" is not clear; maybe "absent" (unless requested)?
++--------------------+---------+--------------------------
+-----------------------------------------------+
+| write_multiple | boolean | ``false`` |
``VFIO_USER_REGION_WRITE_MULTI`` messages |
+| | | | are
supported if the value is ``true``. |
++--------------------+---------+--------------------------
+-----------------------------------------------+
+| sparse_mmap_fds | boolean | ``false`` |
``VFIO_REGION_INFO_CAP_SPARSE_MMAP_FDS`` |
+| | | |
capability is supported if the value is |
+| | | |
``true``. |
++--------------------+---------+--------------------------
+-----------------------------------------------+
The ``twin_socket`` capability object holds these name/value pairs:
ATB,
Mark.