Re: [Intel-gfx] [PATCH v7 4/9] iommufd: Add iommufd_ctx_has_group()

Jason Gunthorpe
2023-06-13T11:46:15Z

On Fri, Jun 02, 2023 at 05:15:10AM -0700, Yi Liu wrote:
> This adds the helper to check if any device within the given iommu_group
> has been bound with the iommufd_ctx. This is helpful for the checking on
> device ownership for the devices which have not been bound but cannot be
> bound to any other iommufd_ctx as the iommu_group has been bound.
>
> Tested-by: Terrence Xu <terrence.xu@intel.com>
> Signed-off-by: Yi Liu <yi.l.liu@intel.com>
> ---
> drivers/iommu/iommufd/device.c | 30 ++++++++++++++++++++++++++++++
> include/linux/iommufd.h | 8 ++++++++
> 2 files changed, 38 insertions(+)

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

Jason