iommufd/selftest: Add coverage for IOMMU_HWPT_ALLOC with nested HWPTs
authorNicolin Chen <nicolinc@nvidia.com>
Thu, 26 Oct 2023 04:39:38 +0000 (21:39 -0700)
committerJason Gunthorpe <jgg@nvidia.com>
Thu, 26 Oct 2023 14:15:57 +0000 (11:15 -0300)
commit55a01657cbee07d772b1d3cb144f867a326e4673
treecb2a3dd75744625cccbc122a1cbc851d8e14eeeb
parent65fe32f7a4472e19331a524b9c980b3444dd20a2
iommufd/selftest: Add coverage for IOMMU_HWPT_ALLOC with nested HWPTs

The IOMMU_HWPT_ALLOC ioctl now supports passing user_data to allocate a
user-managed domain for nested HWPTs. Add its coverage for that. Also,
update _test_cmd_hwpt_alloc() and add test_cmd/err_hwpt_alloc_nested().

Link: https://lore.kernel.org/r/20231026043938.63898-11-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>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
tools/testing/selftests/iommu/iommufd.c
tools/testing/selftests/iommu/iommufd_fail_nth.c
tools/testing/selftests/iommu/iommufd_utils.h