summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMostafa Saleh <smostafa@google.com>2026-01-09 17:18:03 +0000
committerJoerg Roedel <joerg.roedel@amd.com>2026-01-10 10:52:26 +0100
commitccc21213f013834b484cdcc738e282f963fcfc97 (patch)
treeb78671940295f76aa1d3ea7c8338f46da17a54be /include
parent466ae6978a5b8c6022bd4537fbfd00e94bb07219 (diff)
iommu: Add calls for IOMMU_DEBUG_PAGEALLOC
Add calls for the new iommu debug config IOMMU_DEBUG_PAGEALLOC: - iommu_debug_init: Enable the debug mode if configured by the user. - iommu_debug_map: Track iommu pages mapped, using physical address. - iommu_debug_unmap_begin: Track start of iommu unmap operation, with IOVA and size. - iommu_debug_unmap_end: Track the end of unmap operation, passing the actual unmapped size versus the tracked one at unmap_begin. We have to do the unmap_begin/end as once pages are unmapped we lose the information of the physical address. This is racy, but the API is racy by construction as it uses refcounts and doesn't attempt to lock/synchronize with the IOMMU API as that will be costly, meaning that possibility of false negative exists. Reviewed-by: Samiullah Khawaja <skhawaja@google.com> Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com> Reviewed-by: Pranjal Shrivastava <praan@google.com> Signed-off-by: Mostafa Saleh <smostafa@google.com> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/iommu-debug-pagealloc.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/iommu-debug-pagealloc.h b/include/linux/iommu-debug-pagealloc.h
index 83e64d70bf6c..a439d6815ca1 100644
--- a/include/linux/iommu-debug-pagealloc.h
+++ b/include/linux/iommu-debug-pagealloc.h
@@ -9,6 +9,7 @@
#define __LINUX_IOMMU_DEBUG_PAGEALLOC_H
#ifdef CONFIG_IOMMU_DEBUG_PAGEALLOC
+DECLARE_STATIC_KEY_FALSE(iommu_debug_initialized);
extern struct page_ext_operations page_iommu_debug_ops;