Skip to contentSkip to conversation

x86/pci-dma: add a SWIOTLB_ANY flag to lift the 1GB limitation

PATCH Superseded Jun Miao 1 participant 1 message Feb 12 x86

v2 of 4 Superseded Latest is v4 →

lore
Share & tools
lore

Jun Miao

author
#0 lore raw

PATCH v2 1/1 x86/pci-dma: add a SWIOTLB_ANY flag to lift the 1GB limitation

Intel TDX guest wants to allocate a swiotlb buffer that is not restricted to low memory for the trusted hypervisor scheme. Adding a new flag will be used in swiotlb_memblock_alloc() to allow allocation of SWIOTLB memory beyond 1GB.

Power SVM already supports this, but X86 still faces the same limitation.
Commit: 8ba2ed1be9 (swiotlb: add a SWIOTLB_ANY flag to lift the low memory restriction)

---

V1 -> V2:
1.Updated commit message and description.
2.Add Reviewed and Tested.

V1 Latest Feedback : https://lists.openwall.net/linux-kernel/2026/02/11/483

---
 arch/x86/kernel/pci-dma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/kernel/pci-dma.c +1 -1
index 6267363e0189..73b9320c4a7d 100644
@@ -61,7 +61,7 @@ static void __init pci_swiotlb_detect(void)
 	 */
 	if (cc_platform_has(CC_ATTR_GUEST_MEM_ENCRYPT)) {
 		x86_swiotlb_enable = true;
-		x86_swiotlb_flags |= SWIOTLB_FORCE;
+		x86_swiotlb_flags |= SWIOTLB_ANY | SWIOTLB_FORCE;
 	}
 }
 #else
Signature · 1 line
2.47.1