Paolo's mail address is wrong. Added the right one. > From: Liu, Yi L <yi.l.liu@xxxxxxxxx> > Sent: Wednesday, February 22, 2023 10:23 AM > > as some vfio_device drivers require a kvm pointer to be set in their > open_device and kvm pointer is set to VFIO in GROUP_ADD path. > > Signed-off-by: Yi Liu <yi.l.liu@xxxxxxxxx> > --- > v2: > - Adopt Alex's suggestion > v1: https://lore.kernel.org/kvm/20230221034114.135386-1- > yi.l.liu@xxxxxxxxx/ > --- > Documentation/virt/kvm/devices/vfio.rst | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/Documentation/virt/kvm/devices/vfio.rst > b/Documentation/virt/kvm/devices/vfio.rst > index 2d20dc561069..79b6811bb4f3 100644 > --- a/Documentation/virt/kvm/devices/vfio.rst > +++ b/Documentation/virt/kvm/devices/vfio.rst > @@ -39,3 +39,10 @@ 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. > -- > 2.34.1