aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorJohn Levon <john.levon@nutanix.com>2021-03-10 10:37:59 +0000
committerGitHub <noreply@github.com>2021-03-10 10:37:59 +0000
commit052d709d0cfd77c36f5b31402c3cc1c3d868d618 (patch)
tree29f6fbba5fa94e80e7c53bbc2fdde474ae16a1b0 /docs
parent997536eee6609827b5053afef497f94bc6f6dbf4 (diff)
downloadlibvfio-user-052d709d0cfd77c36f5b31402c3cc1c3d868d618.zip
libvfio-user-052d709d0cfd77c36f5b31402c3cc1c3d868d618.tar.gz
libvfio-user-052d709d0cfd77c36f5b31402c3cc1c3d868d618.tar.bz2
fix IRQ disable path (#386)
Properly fix IRQ disabling: Allow count == 0 to mean "disable all IRQS of the given type". On our side, disabling an IRQ means forgetting about the eventfd that was previously passed over the socket. Allow individual IRQs to be disabled, by means of a VFIO_IRQ_SET_DATA_EVENTFD message with no file descriptors passed. In vfio, this is done via setting "-1" in the fd slots; which isn't possible via auxiliary data. Thus, only one IRQ can be disabled a a time in vfio-user. Clean up "->type": this is never set, so wasn't having any effect. Follow up changes will likely re-introduce this in some form. Signed-off-by: John Levon <john.levon@nutanix.com> Reviewed-by: Thanos Makatos <thanos.makatos@nutanix.com>
Diffstat (limited to 'docs')
-rw-r--r--docs/vfio-user.rst6
1 files changed, 4 insertions, 2 deletions
diff --git a/docs/vfio-user.rst b/docs/vfio-user.rst
index f4562ef..93d61cd 100644
--- a/docs/vfio-user.rst
+++ b/docs/vfio-user.rst
@@ -1276,6 +1276,8 @@ VFIO IRQ set format
was sent in the message meta-data. These descriptors will be signalled when
the action defined by the action flags occurs. In AF_UNIX sockets, the
descriptors are sent as SCM_RIGHTS type ancillary data.
+ If no file descriptors are provided, this de-assigns the specified
+ previously configured interrupts.
* *VFIO_IRQ_SET_ACTION_MASK* indicates a masking event. It can be used with
VFIO_IRQ_SET_DATA_BOOL or VFIO_IRQ_SET_DATA_NONE to mask an interrupt, or
with VFIO_IRQ_SET_DATA_EVENTFD to generate an event when the guest masks
@@ -1292,8 +1294,8 @@ VFIO IRQ set format
* *index* is the index of IRQ type being setup.
* *start* is the start of the sub-index being set.
* *count* describes the number of sub-indexes being set. As a special case, a
- count of 0 with data flags of VFIO_IRQ_SET_DATA_NONE disables all interrupts
- of the index.
+ count (and start) of 0, with data flags of VFIO_IRQ_SET_DATA_NONE disables
+ all interrupts of the index.
* *data* is an optional field included when the
VFIO_IRQ_SET_DATA_BOOL flag is present. It contains an array of booleans
that specify whether the action is to be performed on the corresponding