aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYi Liu <[email protected]>2023-04-20 22:36:11 -0700
committerAlex Williamson <[email protected]>2023-04-21 13:48:44 -0600
commit705b004ee377b789e39ae237519bab714297ac83 (patch)
treed7df1c36cf3acf12258fffab7cc2dbb685b3a92f
parent38e4614c27210e63aafad1bb2e4a427515e46d71 (diff)
docs: kvm: vfio: Suggest KVM_DEV_VFIO_GROUP_ADD vs VFIO_GROUP_GET_DEVICE_FD ordering
as some vfio_device's open_device op requires kvm pointer and kvm pointer set is part of GROUP_ADD. Reviewed-by: Kevin Tian <[email protected]> Signed-off-by: Yi Liu <[email protected]> Reviewed-by: Jason Gunthorpe <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alex Williamson <[email protected]>
-rw-r--r--Documentation/virt/kvm/devices/vfio.rst5
1 files changed, 5 insertions, 0 deletions
diff --git a/Documentation/virt/kvm/devices/vfio.rst b/Documentation/virt/kvm/devices/vfio.rst
index 2d20dc561069..08b544212638 100644
--- a/Documentation/virt/kvm/devices/vfio.rst
+++ b/Documentation/virt/kvm/devices/vfio.rst
@@ -39,3 +39,8 @@ KVM_DEV_VFIO_GROUP attributes:
- @groupfd is a file descriptor for a VFIO group;
- @tablefd is a file descriptor for a TCE table allocated via
KVM_CREATE_SPAPR_TCE.
+
+The GROUP_ADD operation above should be invoked prior to accessing the
+device file descriptor via VFIO_GROUP_GET_DEVICE_FD in order to support
+drivers which require a kvm pointer to be set in their .open_device()
+callback.