iommufd: Add IOMMU_HWPT_ALLOC
authorJason Gunthorpe <jgg@nvidia.com>
Mon, 17 Jul 2023 18:12:13 +0000 (15:12 -0300)
committerJason Gunthorpe <jgg@nvidia.com>
Wed, 26 Jul 2023 13:20:31 +0000 (10:20 -0300)
commit7074d7bd67d495cb3f6fe7c7c96b357a3b9d4ec2
treef42cb80a3ff2813405e9af7d98011e6fda79ee90
parentfa1ffdb9e2937d04657c33a146aa0d2cd39abba0
iommufd: Add IOMMU_HWPT_ALLOC

This allows userspace to manually create HWPTs on IOAS's and then use
those HWPTs as inputs to iommufd_device_attach/replace().

Following series will extend this to allow creating iommu_domains with
driver specific parameters.

Link: https://lore.kernel.org/r/17-v8-6659224517ea+532-iommufd_alloc_jgg@nvidia.com
Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Tested-by: Nicolin Chen <nicolinc@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/iommu/iommufd/hw_pagetable.c
drivers/iommu/iommufd/iommufd_private.h
drivers/iommu/iommufd/main.c
include/uapi/linux/iommufd.h