[Intel-gfx] [PATCH v2 0/5] vfio: Make emulated devices prepared for vfio device cdev
Yi Liu
yi.l.liu at intel.com
Thu Mar 16 12:15:21 UTC 2023
The .bind_iommufd op of vfio emulated devices are either empty or does
nothing. This is different with the vfio physical devices, to add vfio
device cdev, need to make them act the same.
This series first makes the .bind_iommufd op of vfio emulated devices
to create iommufd_access, this introduces a new iommufd API. Then let
the driver that does not provide .bind_iommufd op to use the vfio emulated
iommufd op set. This makes all vfio device drivers have consistent iommufd
operations, which is good for adding new device uAPIs in the device cdev
series.
Change log:
v2:
- Add r-b from Kevin and Jason
- Refine patch 01 per comments from Jason and Kevin
v1: https://lore.kernel.org/kvm/20230308131340.459224-1-yi.l.liu@intel.com/
Thanks,
Yi Liu
Nicolin Chen (1):
iommufd: Create access in vfio_iommufd_emulated_bind()
Yi Liu (4):
vfio-iommufd: No need to record iommufd_ctx in vfio_device
vfio-iommufd: Make vfio_iommufd_emulated_bind() return iommufd_access
ID
vfio/mdev: Uses the vfio emulated iommufd ops set in the mdev sample
drivers
vfio: Check the presence for iommufd callbacks in
__vfio_register_dev()
drivers/iommu/iommufd/device.c | 57 ++++++++++++++++++++------------
drivers/iommu/iommufd/selftest.c | 8 +++--
drivers/vfio/iommufd.c | 39 +++++++++++-----------
drivers/vfio/vfio_main.c | 5 +--
include/linux/iommufd.h | 5 +--
include/linux/vfio.h | 1 -
samples/vfio-mdev/mbochs.c | 3 ++
samples/vfio-mdev/mdpy.c | 3 ++
samples/vfio-mdev/mtty.c | 3 ++
9 files changed, 76 insertions(+), 48 deletions(-)
--
2.34.1
More information about the Intel-gfx
mailing list