[PATCH 1/1] Revert "iommu: disable SVA when CONFIG_X86 is set"
Mehmet Basaran
mehmet.basaran at canonical.com
Wed Apr 22 17:57:46 UTC 2026
BugLink: https://bugs.launchpad.net/bugs/2149766
This reverts commit 21020d6dd7b2309dbdda9610e545a2e2a278a8fc.
The issue has been brought to our attention when questing (6.17)
kernels were unable to load amd_xdna drivers. However, this commit,
in addition to NPUs, also affects PCIe cards which make use of
unified memory (GPUs, Accelerators, NICs). With this commit, PCIe
devices will revert to using legacy method (pinning) instead of
unified memory. As a result,
- arguably it will be less secure,
- there can be performance drops.
Currently, this commit is part of an 8 commit patch series:
"Fix stale IOTLB entries for kernel address space", v7.
[PATCH v7 1/8] iommu: Disable SVA when CONFIG_X86 is set
[PATCH v7 2/8] mm: Add a ptdesc flag to mark kernel page tables
[PATCH v7 3/8] mm: Actually mark kernel page table pages
[PATCH v7 4/8] x86/mm: Use 'ptdesc' when freeing PMD pages
[PATCH v7 5/8] mm: Introduce pure page table freeing function
[PATCH v7 6/8] x86/mm: Use pagetable_free()
[PATCH v7 7/8] mm: Introduce deferred freeing for kernel page tables
[PATCH v7 8/8] iommu/sva: Invalidate stale IOTLB entries for kernel address space
where "iommu: disable SVA when CONFIG_X86 is set" is undone by
the 8th commit. We only have this commit from the whole patchset.
Ideally we should have the whole patchset applied.
This commit fixes the following issue which is old,
26b25a2b98e4 ("iommu: Bind process address spaces to devices")
and we applied this commit recently. So, reverting this commit
won't be introducing regressions. Affected kernel versions are:
- 6.8 due to the reasons above.
- 6.17 due to both the reasons above and the amd_xdna issue.
Signed-off-by: Mehmet Basaran <mehmet.basaran at canonical.com>
---
drivers/iommu/iommu-sva.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/iommu/iommu-sva.c b/drivers/iommu/iommu-sva.c
index 07f6f80ee819..65814cbc8402 100644
--- a/drivers/iommu/iommu-sva.c
+++ b/drivers/iommu/iommu-sva.c
@@ -74,9 +74,6 @@ struct iommu_sva *iommu_sva_bind_device(struct device *dev, struct mm_struct *mm
struct iommu_sva *handle;
int ret;
- if (IS_ENABLED(CONFIG_X86))
- return ERR_PTR(-EOPNOTSUPP);
-
mutex_lock(&iommu_sva_lock);
/* Allocate mm->pasid if necessary. */
--
2.43.0
More information about the kernel-team
mailing list