Thread (38 messages) 38 messages, 7 authors, 2022-03-09

Re: [PATCH 08/12] x86: centralize setting SWIOTLB_FORCE when guest memory encryption is enabled

From: Andrew Cooper <hidden>
Date: 2022-03-01 11:41:18
Also in: linux-arm-kernel, linux-hyperv, linux-iommu, linux-mips, linux-pci, linux-riscv, linux-s390, xen-devel

On 01/03/2022 10:53, Christoph Hellwig wrote:
quoted hunk ↗ jump to hunk
diff --git a/arch/x86/kernel/pci-dma.c b/arch/x86/kernel/pci-dma.c
index 2ac0ef9c2fb76..7ab7002758396 100644
--- a/arch/x86/kernel/pci-dma.c
+++ b/arch/x86/kernel/pci-dma.c
@@ -53,6 +53,13 @@ static void __init pci_swiotlb_detect(void)
 	if (cc_platform_has(CC_ATTR_HOST_MEM_ENCRYPT))
 		x86_swiotlb_enable = true;
 
+	/*
+	 * Guest with guest memory encryption must always do I/O through a
+	 * bounce buffer as the hypervisor can't access arbitrary VM memory.
This isn't really "must".  The guest is perfectly capable of sharing
memory with the hypervisor.

It's just that for now, bounce buffering is allegedly faster, and the
simple way of getting it working.

~Andrew
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help