[Intel-gfx] [PATCH v3 03/15] vfio: Accept vfio device file in the driver facing kAPI
Alex Williamson
alex.williamson at redhat.com
Mon Feb 13 23:21:50 UTC 2023
On Mon, 13 Feb 2023 07:13:36 -0800
Yi Liu <yi.l.liu at intel.com> wrote:
> This makes the vfio file kAPIs to accepte vfio device files, also a
> preparation for vfio device cdev support.
>
> For the kvm set with vfio device file, kvm pointer is stored in struct
> vfio_device_file, and use kvm_ref_lock to protect kvm set and kvm
> pointer usage within VFIO. This kvm pointer will be set to vfio_device
> after device file is bound to iommufd in the cdev path.
>
> Signed-off-by: Yi Liu <yi.l.liu at intel.com>
> Reviewed-by: Kevin Tian <kevin.tian at intel.com>
> ---
> drivers/vfio/vfio.h | 2 ++
> drivers/vfio/vfio_main.c | 51 ++++++++++++++++++++++++++++++++++++----
> 2 files changed, 49 insertions(+), 4 deletions(-)
This subtly changes the behavior of the vfio-pci hot reset functions
without updating the uAPI description or implementation to use less
group-centric variables. The new behavior appears to be that cdev fds
can also be passed to prove ownership of the affected set of devices
for a hot reset, but this probably needs to be examined for gaps.
Thanks,
Alex
More information about the Intel-gfx
mailing list