]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
iommufd/selftest: Add coverage for vdevice tombstone
authorXu Yilun <yilun.xu@linux.intel.com>
Wed, 16 Jul 2025 07:03:48 +0000 (15:03 +0800)
committerJason Gunthorpe <jgg@nvidia.com>
Fri, 18 Jul 2025 20:33:08 +0000 (17:33 -0300)
commit39a369c34152e1b76895fda37aa586dfb9b2cf38
tree0baafcb25cc670bb16e0623b5bfbe571759ae57f
parentc4e496d413686cbd717139cfd8c58f467eff9e08
iommufd/selftest: Add coverage for vdevice tombstone

This tests the flow to tombstone vdevice when idevice is to be unbound
before vdevice destruction. The expected results of the tombstone are:

 - The vdevice ID can't be reused anymore (not tested in this patch).
 - Even ioctl(IOMMU_DESTROY) can't free the vdevice ID.
 - iommufd_fops_release() can still free everything.

Link: https://patch.msgid.link/r/20250716070349.1807226-8-yilun.xu@linux.intel.com
Reviewed-by: Nicolin Chen <nicolinc@nvidia.com>
Tested-by: Nicolin Chen <nicolinc@nvidia.com>
Signed-off-by: Xu Yilun <yilun.xu@linux.intel.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
tools/testing/selftests/iommu/iommufd.c