linux-stable/drivers/iommu/iommufd
Nicolin Chen b5021cb264 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>
2023-10-26 11:15:57 -03:00
..
device.c iommufd: Derive iommufd_hwpt_paging from iommufd_hw_pagetable 2023-10-26 11:15:56 -03:00
double_span.h
hw_pagetable.c iommufd: Share iommufd_hwpt_alloc with IOMMUFD_OBJ_HWPT_NESTED 2023-10-26 11:15:57 -03:00
io_pagetable.c iommufd: Add a flag to skip clearing of IOPTE dirty 2023-10-24 11:58:43 -03:00
io_pagetable.h
ioas.c iommu/iommufd: Pass iommufd_ctx pointer in iommufd_get_ioas() 2023-03-29 16:52:41 -03:00
iommufd_private.h iommufd: Derive iommufd_hwpt_paging from iommufd_hw_pagetable 2023-10-26 11:15:56 -03:00
iommufd_test.h iommufd/selftest: Test IOMMU_HWPT_GET_DIRTY_BITMAP 2023-10-24 11:58:44 -03:00
iova_bitmap.c iommufd/iova_bitmap: Move symbols to IOMMUFD namespace 2023-10-24 11:58:42 -03:00
Kconfig vfio: Compile vfio_group infrastructure optionally 2023-07-25 10:20:50 -06:00
main.c iommufd: Derive iommufd_hwpt_paging from iommufd_hw_pagetable 2023-10-26 11:15:56 -03:00
Makefile vfio: Move iova_bitmap into iommufd 2023-10-24 11:58:42 -03:00
pages.c iommufd: Set end correctly when doing batch carry 2023-07-27 11:27:20 -03:00
selftest.c iommufd: Rename IOMMUFD_OBJ_HW_PAGETABLE to IOMMUFD_OBJ_HWPT_PAGING 2023-10-26 11:15:56 -03:00
vfio_compat.c iommufd: Derive iommufd_hwpt_paging from iommufd_hw_pagetable 2023-10-26 11:15:56 -03:00