[Intel-gfx] [PATCH v8 11/24] vfio: Make vfio_device_first_open() to accept NULL iommufd for noiommu

Jason Gunthorpe jgg at nvidia.com
Thu Mar 30 23:56:13 UTC 2023


On Mon, Mar 27, 2023 at 02:40:34AM -0700, Yi Liu wrote:
> vfio_device_first_open() requires the caller to provide either a valid
> iommufd (the group path in iommufd compat mode) or a valid container
> (the group path in legacy container mode). As preparation for noiommu
> support in device cdev path it's extended to allow both being NULL. The
> caller is expected to verify noiommu permission before passing NULL
> to this function.
> 
> Reviewed-by: Kevin Tian <kevin.tian at intel.com>
> Tested-by: Terrence Xu <terrence.xu at intel.com>
> Signed-off-by: Yi Liu <yi.l.liu at intel.com>
> ---
>  drivers/vfio/group.c     |  8 ++++++++
>  drivers/vfio/vfio.h      |  1 +
>  drivers/vfio/vfio_main.c | 12 ++++++++----
>  3 files changed, 17 insertions(+), 4 deletions(-)

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

Jason


More information about the Intel-gfx mailing list