Skip to content

Commit 705b004

Browse files
yiliu1765Alex Williamson
authored andcommitted
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 <kevin.tian@intel.com> Signed-off-by: Yi Liu <yi.l.liu@intel.com> Reviewed-by: Jason Gunthorpe <jgg@nvidia.com> Link: https://lore.kernel.org/r/20230421053611.55839-1-yi.l.liu@intel.com Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
1 parent 38e4614 commit 705b004

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

Documentation/virt/kvm/devices/vfio.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,8 @@ KVM_DEV_VFIO_GROUP attributes:
3939
- @groupfd is a file descriptor for a VFIO group;
4040
- @tablefd is a file descriptor for a TCE table allocated via
4141
KVM_CREATE_SPAPR_TCE.
42+
43+
The GROUP_ADD operation above should be invoked prior to accessing the
44+
device file descriptor via VFIO_GROUP_GET_DEVICE_FD in order to support
45+
drivers which require a kvm pointer to be set in their .open_device()
46+
callback.

0 commit comments

Comments
 (0)