[PATCH v7 15/16] iommufd: Allow vIOMMUs without a parent HWPT
Jason Gunthorpe
jgg at nvidia.com
Wed Oct 28 12:07:21 PDT 2026
> VIOMMU_ALLOC currently requires a nesting parent HWPT_PAGING even when
> the selected vIOMMU implementation has no use for one. This would force
> implementations such as the following Arm Realm vIOMMU to create an
> unused parent.
>
> Add IOMMUFD_VIOMMU_NO_HWPT so an implementation can opt out. Require
> hwpt_id to be zero in that case and pass a NULL parent domain to its
> initialization callback. Keep the existing parent validation and
> reference handling for implementations that require a HWPT.
>
> Reject nested domain and hardware queue allocation for a vIOMMU without
> a parent, and document the two allocation modes in the UAPI.
>
> Cc: jgg at ziepe.ca
> Cc: kevin.tian at intel.com
> Cc: corbet at lwn.net
> Cc: skhan at linuxfoundation.org
> Cc: rdunlap at infradead.org
> Cc: joro at 8bytes.org
> Cc: will at kernel.org
> Cc: robin.murphy at arm.com
> Signed-off-by: Aneesh Kumar K.V (Arm) <aneesh.kumar at kernel.org>
> ---
> Documentation/userspace-api/iommufd.rst | 44 +++++++++----------
> drivers/iommu/iommufd/hw_pagetable.c | 14 +++++--
> drivers/iommu/iommufd/viommu.c | 56 +++++++++++++++----------
> include/linux/iommufd.h | 13 ++++--
> include/uapi/linux/iommufd.h | 3 +-
> 5 files changed, 77 insertions(+), 53 deletions(-)
>
I should check it carefully but this looks reasonable
--
Jason
More information about the linux-arm-kernel
mailing list