aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorThanos Makatos <thanos.makatos@nutanix.com>2021-06-09 11:15:34 +0100
committerGitHub <noreply@github.com>2021-06-09 11:15:34 +0100
commit1abe697341061a6c16e4a5d28b20b5efa7035a81 (patch)
treed034333d573cf5228a03cb9466540a822a60ee20 /docs
parent57684de8240fce4a277301a86a803842338762af (diff)
downloadlibvfio-user-1abe697341061a6c16e4a5d28b20b5efa7035a81.zip
libvfio-user-1abe697341061a6c16e4a5d28b20b5efa7035a81.tar.gz
libvfio-user-1abe697341061a6c16e4a5d28b20b5efa7035a81.tar.bz2
drop mappable flag from DMA map (#553)
The flags field belongs to VFIO and it's not a good idea to reuse as new VFIO flags can break things. Instead, we derive whether or not a region is mappable if a file descriptor is passed. Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com> Reviewed-by: Swapnil Ingle <swapnil.ingle@nutanix.com> Reviewed-by: John Levon <john.levon@nutanix.com>
Diffstat (limited to 'docs')
-rw-r--r--docs/vfio-user.rst21
1 files changed, 9 insertions, 12 deletions
diff --git a/docs/vfio-user.rst b/docs/vfio-user.rst
index a5d2b43..9e23fb3 100644
--- a/docs/vfio-user.rst
+++ b/docs/vfio-user.rst
@@ -547,8 +547,6 @@ The request payload for this message is a structure of the following format:
| | +-----+------------+ |
| | | 1 | writeable | |
| | +-----+------------+ |
-| | | 2 | mappable | |
-| | +-----+------------+ |
+-------------+--------+-------------+
| offset | 8 | 8 |
+-------------+--------+-------------+
@@ -565,9 +563,6 @@ The request payload for this message is a structure of the following format:
* *writeable* indicates that the region can be written to.
- * *mappable* indicates that the region can be mapped via the mmap() system
- call using the file descriptor provided in the message meta-data.
-
* *offset* is the file offset of the region with respect to the associated file
descriptor, or zero if the region is not mappable
* *address* is the base DMA address of the region.
@@ -576,13 +571,15 @@ The request payload for this message is a structure of the following format:
This structure is 32 bytes in size, so the message size is 16 + 32 bytes.
If the DMA region being added can be directly mapped by the server, a file
-descriptor must be sent as part of the message meta-data. On ``AF_UNIX``
-sockets, the file descriptor must be passed as ``SCM_RIGHTS`` type ancillary
-data. Otherwise, if the DMA region cannot be directly mapped by the server, it
-can be accessed by the server using ``VFIO_USER_DMA_READ`` and
-``VFIO_USER_DMA_WRITE`` messages, explained in `Read and Write Operations`_. A
-command to map over an existing region must be failed by the server with
-``EEXIST`` set in error field in the reply.
+descriptor must be sent as part of the message meta-data. The region can be
+mapped via the mmap() system call. On ``AF_UNIX`` sockets, the file descriptor
+must be passed as ``SCM_RIGHTS`` type ancillary data. Otherwise, if the DMA
+region cannot be directly mapped by the server, no file descriptor must be sent
+as part of the message meta-data and the DMA region can be accessed by the
+server using ``VFIO_USER_DMA_READ`` and ``VFIO_USER_DMA_WRITE`` messages,
+explained in `Read and Write Operations`_. A command to map over an existing
+region must be failed by the server with ``EEXIST`` set in error field in the
+reply.
Reply
^^^^^