mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] swiotlb: add a SWIOTLB_ANY flag to lift restricted low memory for encryption
@ 2025-04-29 16:53 Jun Miao
  2025-05-08  9:49 ` Miao, Jun
  2026-02-11  9:35 ` Aakarsh Jain
  0 siblings, 2 replies; 4+ messages in thread
From: Jun Miao @ 2025-04-29 16:53 UTC (permalink / raw)
  To: tglx, mingo, bp, dave.hansen; +Cc: x86, linux-kernel, jun.miao, fan.du

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@intel.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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-02-12  3:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-04-29 16:53 [PATCH] swiotlb: add a SWIOTLB_ANY flag to lift restricted low memory for encryption Jun Miao
2025-05-08  9:49 ` Miao, Jun
2026-02-11  9:35 ` Aakarsh Jain
2026-02-12  3:18   ` Miao, Jun

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®