[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20250429165330.2644155-1-jun.miao@intel.com>
Date: Tue, 29 Apr 2025 12:53:30 -0400
From: Jun Miao <jun.miao@...el.com>
To: tglx@...utronix.de,
mingo@...hat.com,
bp@...en8.de,
dave.hansen@...ux.intel.com
Cc: x86@...nel.org,
linux-kernel@...r.kernel.org,
jun.miao@...el.com,
fan.du@...el.com
Subject: [PATCH] swiotlb: add a SWIOTLB_ANY flag to lift restricted low memory for encryption
TDX guest wants to allocate a swiotlb buffer that is not restricted
to low memory for the trusted hypervisor scheme. So that allow to pick
a location everywhere for hypervisors with guest memory encryption in
swiotlb_memblock_alloc() interface by adding a new flag.
Signed-off-by: Jun Miao <jun.miao@...el.com>
---
arch/x86/kernel/pci-dma.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/kernel/pci-dma.c b/arch/x86/kernel/pci-dma.c
index 6267363e0189..73b9320c4a7d 100644
--- a/arch/x86/kernel/pci-dma.c
+++ b/arch/x86/kernel/pci-dma.c
@@ -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
--
2.43.0
Powered by blists - more mailing lists