vfio/mdev: Uses the vfio emulated iommufd ops set in the mdev sample drivers
authorYi Liu <yi.l.liu@intel.com>
Mon, 27 Mar 2023 09:33:50 +0000 (02:33 -0700)
committerJason Gunthorpe <jgg@nvidia.com>
Fri, 31 Mar 2023 16:43:32 +0000 (13:43 -0300)
commit0a782d15e1d406e8074954405b1dc143a7645344
tree29523857f6f4a91c485701c4bb225fdab21c7fc9
parent632fda7f912c845f98ff20e69c600160a189d803
vfio/mdev: Uses the vfio emulated iommufd ops set in the mdev sample drivers

This harmonizes the no-DMA devices (the vfio-mdev sample drivers) with
the emulated devices (gvt-g, vfio-ap etc.). It makes it easier to add
BIND_IOMMUFD user interface which requires to return an iommufd ID to
represent the device/iommufd bond.

Link: https://lore.kernel.org/r/20230327093351.44505-6-yi.l.liu@intel.com
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Tested-by: Terrence Xu <terrence.xu@intel.com>
Tested-by: Nicolin Chen <nicolinc@nvidia.com>
Signed-off-by: Yi Liu <yi.l.liu@intel.com>
Acked-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/vfio/iommufd.c
samples/vfio-mdev/mbochs.c
samples/vfio-mdev/mdpy.c
samples/vfio-mdev/mtty.c