aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
diff options
context:
space:
mode:
authorXu Yilun <[email protected]>2025-07-16 07:03:43 +0000
committerJason Gunthorpe <[email protected]>2025-07-18 20:33:08 +0000
commite6d41ee31219b4d605c2a26bdca0984108e6e01a (patch)
tree3fb3ee73572c2176cd9e856e721b8f065566404b /drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
parentiommufd/viommu: Roll back to use iommufd_object_alloc() for vdevice (diff)
downloadkernel-e6d41ee31219b4d605c2a26bdca0984108e6e01a.tar.gz
kernel-e6d41ee31219b4d605c2a26bdca0984108e6e01a.zip
iommufd: Add iommufd_object_tombstone_user() helper
Add the iommufd_object_tombstone_user() helper, which allows the caller to destroy an iommufd object created by userspace. This is useful on some destroy paths when the kernel caller finds the object should have been removed by userspace but is still alive. With this helper, the caller destroys the object but leave the object ID reserved (so called tombstone). The tombstone prevents repurposing the object ID without awareness of the original user. Since this happens for abnormal userspace behavior, for simplicity, the tombstoned object ID would be permanently leaked until iommufd_fops_release(). I.e. the original user gets an error when calling ioctl(IOMMU_DESTROY) on that ID. The first use case would be to ensure the iommufd_vdevice can't outlive the associated iommufd_device. Link: https://patch.msgid.link/r/[email protected] Suggested-by: Jason Gunthorpe <[email protected]> Reviewed-by: Lu Baolu <[email protected]> Reviewed-by: Nicolin Chen <[email protected]> Reviewed-by: Kevin Tian <[email protected]> Reviewed-by: Jason Gunthorpe <[email protected]> Co-developed-by: "Aneesh Kumar K.V (Arm)" <[email protected]> Signed-off-by: "Aneesh Kumar K.V (Arm)" <[email protected]> Tested-by: Nicolin Chen <[email protected]> Signed-off-by: Xu Yilun <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c')
0 files changed, 0 insertions, 0 deletions