[PATCH v2 0/4] iommufd: Destroy vdevice on device unbind
From: Xu Yilun
Date: Mon Jun 23 2025 - 05:58:38 EST
This is v2 of Aneesh's patch [1].
It is to solve the lifecycle issue that vdevice may outlive idevice. It
is a prerequisite for TIO, to ensure extra secure configurations (e.g.
TSM Bind/Unbind) against vdevice could be rolled back on idevice unbind,
so that VFIO could still work on the physical device without surprise.
This patch revives some Nicolin's vdevice_alloc change in v5.
[1]: https://lore.kernel.org/linux-iommu/20250610065146.1321816-1-aneesh.kumar@xxxxxxxxxx/
[2]: https://lore.kernel.org/all/53025c827c44d68edb6469bfd940a8e8bc6147a5.1729897278.git.nicolinc@xxxxxxxxxx/
Xu Yilun (4):
iommufd: Add iommufd_object_tombstone_user() helper
iommufd/viommu: Fix the uninitialized iommufd_vdevice::ictx
iommufd: Destroy vdevice on idevice destroy
iommufd/selftest: Add coverage for vdevice tombstone
drivers/iommu/iommufd/device.c | 43 +++++++++++++++++++++++++
drivers/iommu/iommufd/iommufd_private.h | 34 ++++++++++++++++++-
drivers/iommu/iommufd/main.c | 32 +++++++++++++-----
drivers/iommu/iommufd/viommu.c | 34 +++++++++++++++++--
tools/testing/selftests/iommu/iommufd.c | 13 ++++++++
5 files changed, 144 insertions(+), 12 deletions(-)
base-commit: 19272b37aa4f83ca52bdf9c16d5d81bdd1354494
--
2.25.1