[Intel-gfx] [PATCH v14 23/26] vfio: Add VFIO_DEVICE_[AT|DE]TACH_IOMMUFD_PT
Jason Gunthorpe
jgg at nvidia.com
Fri Jul 14 14:50:45 UTC 2023
On Mon, Jul 10, 2023 at 07:59:25PM -0700, Yi Liu wrote:
> This adds ioctl for userspace to attach device cdev fd to and detach
> from IOAS/hw_pagetable managed by iommufd.
>
> VFIO_DEVICE_ATTACH_IOMMUFD_PT: attach vfio device to IOAS or hw_pagetable
> managed by iommufd. Attach can be undo
> by VFIO_DEVICE_DETACH_IOMMUFD_PT or device
> fd close.
> VFIO_DEVICE_DETACH_IOMMUFD_PT: detach vfio device from the current attached
> IOAS or hw_pagetable managed by iommufd.
>
> Tested-by: Nicolin Chen <nicolinc at nvidia.com>
> Tested-by: Matthew Rosato <mjrosato at linux.ibm.com>
> Tested-by: Yanting Jiang <yanting.jiang at intel.com>
> Tested-by: Shameer Kolothum <shameerali.kolothum.thodi at huawei.com>
> Tested-by: Terrence Xu <terrence.xu at intel.com>
> Signed-off-by: Yi Liu <yi.l.liu at intel.com>
> ---
> drivers/vfio/device_cdev.c | 58 ++++++++++++++++++++++++++++++++++++++
> drivers/vfio/vfio.h | 5 ++++
> drivers/vfio/vfio_main.c | 15 +++++++++-
> include/uapi/linux/vfio.h | 44 +++++++++++++++++++++++++++++
> 4 files changed, 121 insertions(+), 1 deletion(-)
Reviewed-by: Jason Gunthorpe <jgg at nvidia.com>
Jason
More information about the Intel-gfx
mailing list