aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/iommu/intel/nested.c
diff options
context:
space:
mode:
authorLu Baolu <[email protected]>2025-05-13 03:07:37 +0000
committerJoerg Roedel <[email protected]>2025-05-16 06:49:28 +0000
commit868720fe15d1a6a1bddc28ad7b7e4b62448ee36b (patch)
tree9018dc0134a68ff60b67e43c7e75aa8fed08e9cf /drivers/iommu/intel/nested.c
parentiommu/vt-d: Use ida to manage domain id (diff)
downloadkernel-868720fe15d1a6a1bddc28ad7b7e4b62448ee36b.tar.gz
kernel-868720fe15d1a6a1bddc28ad7b7e4b62448ee36b.zip
iommu/vt-d: Replace spin_lock with mutex to protect domain ida
The domain ID allocator is currently protected by a spin_lock. However, ida_alloc_range can potentially block if it needs to allocate memory to grow its internal structures. Replace the spin_lock with a mutex which allows sleep on block. Thus, the memory allocation flags can be updated from GFP_ATOMIC to GFP_KERNEL to allow blocking memory allocations if necessary. Introduce a new mutex, did_lock, specifically for protecting the domain ida. The existing spinlock will remain for protecting other intel_iommu fields. Signed-off-by: Lu Baolu <[email protected]> Reviewed-by: Kevin Tian <[email protected]> Reviewed-by: Jason Gunthorpe <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Joerg Roedel <[email protected]>
Diffstat (limited to 'drivers/iommu/intel/nested.c')
0 files changed, 0 insertions, 0 deletions