diff options
author | John Levon <john.levon@nutanix.com> | 2021-02-16 16:11:35 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-16 16:11:35 +0000 |
commit | b4baf039588830dfd580a59e7d05efbc65cb6d03 (patch) | |
tree | e54da2a141a202362c3313200de16d4bef35ca9b /docs/vfio-user.rst | |
parent | 4b8d6d3898c28ff87f32b59e48e7e73158e786f8 (diff) | |
download | libvfio-user-b4baf039588830dfd580a59e7d05efbc65cb6d03.zip libvfio-user-b4baf039588830dfd580a59e7d05efbc65cb6d03.tar.gz libvfio-user-b4baf039588830dfd580a59e7d05efbc65cb6d03.tar.bz2 |
fix DEVICE_GET_INFO specification and handling (#344)
The specification for DEVICE_GET_INFO differed from the implementation. After
some discussion, fix the spec such that the struct should be passed in with
->argsz set.
As it happened, the implementation was also wrong: we weren't actually checking
the incoming ->argsz for validation, but we should.
Signed-off-by: John Levon <john.levon@nutanix.com>
Reviewed-by: Thanos Makatos <thanos.makatos@nutanix.com>
Diffstat (limited to 'docs/vfio-user.rst')
-rw-r--r-- | docs/vfio-user.rst | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/docs/vfio-user.rst b/docs/vfio-user.rst index e3adc7a..f4562ef 100644 --- a/docs/vfio-user.rst +++ b/docs/vfio-user.rst @@ -714,7 +714,7 @@ Message format +--------------+----------------------------+ | Command | 4 | +--------------+----------------------------+ -| Message size | 16 in command, 32 in reply | +| Message size | 32 | +--------------+----------------------------+ | Flags | Reply bit set in reply | +--------------+----------------------------+ @@ -724,9 +724,8 @@ Message format +--------------+----------------------------+ This command message is sent by the client to the server to query for basic -information about the device. Only the message header is needed in the command -message. The VFIO device info structure is defined in ``<linux/vfio.h>`` -(``struct vfio_device_info``). +information about the device. The VFIO device info structure is defined in +``<linux/vfio.h>`` (``struct vfio_device_info``). VFIO device info format ^^^^^^^^^^^^^^^^^^^^^^^ @@ -751,7 +750,9 @@ VFIO device info format | num_irqs | 28 | 4 | +-------------+--------+--------------------------+ -* *argsz* is the size of the VFIO device info structure. +* *argsz* is the size of the VFIO device info structure. This is the only field +that should be set to non-zero in the request, identifying the client's expected +size. Currently this is a fixed value. * *flags* contains the following device attributes. * VFIO_DEVICE_FLAGS_RESET indicates that the device supports the |