summaryrefslogtreecommitdiff
path: root/tools/lib/python/kdoc/kdoc_files.py
diff options
context:
space:
mode:
authorJason Gunthorpe <jgg@nvidia.com>2025-11-21 11:51:00 -0400
committerJason Gunthorpe <jgg@nvidia.com>2025-11-25 11:30:15 -0400
commit71e2409a0c85c3875ca0dec2515ccceb21a4785b (patch)
tree80edd7aed9dfed5b1f2be89a56e1565b5619c19f /tools/lib/python/kdoc/kdoc_files.py
parent71db84a092c399f434976d0522e848e9803cd51a (diff)
iommufd: Do not map/unmap revoked DMABUFs
Once a DMABUF is revoked the domain will be unmapped under the pages mutex. Double unmapping will trigger a WARN, and mapping while revoked will fail. Check for revoked DMABUFs along all the map and unmap paths to resolve this. Ensure that map/unmap is always done under the pages mutex so it is synchronized with the revoke notifier. If a revoke happens between allocating the iopt_pages and the population to a domain then the population will succeed, and leave things unmapped as though revoke had happened immediately after. Currently there is no way to repopulate the domains. Userspace is expected to know if it is going to do something that would trigger revoke (eg if it is about to do a FLR) then it should go and remove the DMABUF mappings before and put the back after. The revoke is only to protect the kernel from mis-behaving userspace. Link: https://patch.msgid.link/r/3-v2-b2c110338e3f+5c2-iommufd_dmabuf_jgg@nvidia.com Reviewed-by: Nicolin Chen <nicolinc@nvidia.com> Reviewed-by: Kevin Tian <kevin.tian@intel.com> Tested-by: Nicolin Chen <nicolinc@nvidia.com> Tested-by: Shuai Xue <xueshuai@linux.alibaba.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'tools/lib/python/kdoc/kdoc_files.py')
0 files changed, 0 insertions, 0 deletions