diff options
author | Nicolin Chen <nicolinc@nvidia.com> | 2023-10-26 06:39:33 +0200 |
---|---|---|
committer | Jason Gunthorpe <jgg@nvidia.com> | 2023-10-26 16:15:57 +0200 |
commit | b5021cb264e67baf051569a41debe277c279952b (patch) | |
tree | 7cd2efbe8aff5586a0c71f987f8338fe1ff90896 /drivers/iommu/intel/iommu.c | |
parent | iommufd: Derive iommufd_hwpt_paging from iommufd_hw_pagetable (diff) | |
download | linux-b5021cb264e67baf051569a41debe277c279952b.tar.xz linux-b5021cb264e67baf051569a41debe277c279952b.zip |
iommufd: Share iommufd_hwpt_alloc with IOMMUFD_OBJ_HWPT_NESTED
Allow iommufd_hwpt_alloc() to have a common routine but jump to different
allocators corresponding to different user input pt_obj types, either an
IOMMUFD_OBJ_IOAS for a PAGING hwpt or an IOMMUFD_OBJ_HWPT_PAGING as the
parent for a NESTED hwpt.
Also, move the "flags" validation to the hwpt allocator (paging), so that
later the hwpt_nested allocator can do its own separate flags validation.
Link: https://lore.kernel.org/r/20231026043938.63898-6-yi.l.liu@intel.com
Signed-off-by: Nicolin Chen <nicolinc@nvidia.com>
Signed-off-by: Yi Liu <yi.l.liu@intel.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'drivers/iommu/intel/iommu.c')
0 files changed, 0 insertions, 0 deletions