]> www.infradead.org Git - users/jedix/linux-maple.git/commit
iommufd/selftest: Require vdev_id when attaching to a nested domain
authorNicolin Chen <nicolinc@nvidia.com>
Tue, 11 Mar 2025 19:44:26 +0000 (12:44 -0700)
committerJason Gunthorpe <jgg@nvidia.com>
Tue, 18 Mar 2025 17:17:48 +0000 (14:17 -0300)
commit941d0719aa66adb40b96f049635d86b447577970
treebbbe6889cad5c01a26a2aeedf4319248018bd187
parente8e1ef9b77a7a09b7809890a52229f24d3c8b532
iommufd/selftest: Require vdev_id when attaching to a nested domain

When attaching a device to a vIOMMU-based nested domain, vdev_id must be
present. Add a piece of code hard-requesting it, preparing for a vEVENTQ
support in the following patch. Then, update the TEST_F.

A HWPT-based nested domain will return a NULL new_viommu, thus no such a
vDEVICE requirement.

Link: https://patch.msgid.link/r/4051ca8a819e51cb30de6b4fe9e4d94d956afe3d.1741719725.git.nicolinc@nvidia.com
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Signed-off-by: Nicolin Chen <nicolinc@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/iommu/iommufd/selftest.c
tools/testing/selftests/iommu/iommufd.c