[Intel-gfx] [PATCH v15 22/26] vfio: Add VFIO_DEVICE_BIND_IOMMUFD

Jason Gunthorpe jgg at nvidia.com
Tue Jul 18 16:56:44 UTC 2023


On Tue, Jul 18, 2023 at 06:55:47AM -0700, Yi Liu wrote:
> This adds ioctl for userspace to bind device cdev fd to iommufd.
> 
>     VFIO_DEVICE_BIND_IOMMUFD: bind device to an iommufd, hence gain DMA
> 			      control provided by the iommufd. open_device
> 			      op is called after bind_iommufd op.
> 
> 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>
> Tested-by: Zhenzhong Duan <zhenzhong.duan at intel.com>
> Signed-off-by: Yi Liu <yi.l.liu at intel.com>
> ---
>  drivers/vfio/device_cdev.c | 107 +++++++++++++++++++++++++++++++++++++
>  drivers/vfio/vfio.h        |  13 +++++
>  drivers/vfio/vfio_main.c   |   5 ++
>  include/linux/vfio.h       |   5 +-
>  include/uapi/linux/vfio.h  |  27 ++++++++++
>  5 files changed, 155 insertions(+), 2 deletions(-)

Reviewed-by: Jason Gunthorpe <jgg at nvidia.com>

Jason


More information about the Intel-gfx mailing list