Re: [PATCH v2 04/19] iommufd: Allow pt_id to carry viommu_id for IOMMU_HWPT_ALLOC

From: Jason Gunthorpe
Date: Thu Sep 05 2024 - 11:56:28 EST


On Tue, Aug 27, 2024 at 09:59:41AM -0700, Nicolin Chen wrote:
> Now a VIOMMU can wrap a shareable nested parent HWPT. So, it can act like
> a nested parent HWPT to allocate a nested HWPT.
>
> Support that in the IOMMU_HWPT_ALLOC ioctl handler, and update its kdoc.
>
> Also, associate a viommu to an allocating nested HWPT.
>
> Signed-off-by: Nicolin Chen <nicolinc@xxxxxxxxxx>
> ---
> drivers/iommu/iommufd/hw_pagetable.c | 24 ++++++++++++++++++++++--
> drivers/iommu/iommufd/iommufd_private.h | 1 +
> include/uapi/linux/iommufd.h | 12 ++++++------
> 3 files changed, 29 insertions(+), 8 deletions(-)

Reviewed-by: Jason Gunthorpe <jgg@xxxxxxxxxx>

Jason