Re: [RFC PATCH V3 08/11] swiotlb: Add bounce buffer remap address setting function

From: Tianyu Lan
Date: Mon Jun 14 2021 - 09:43:20 EST


On 6/14/2021 9:37 PM, Tianyu Lan wrote:


On 6/14/2021 3:12 PM, Christoph Hellwig wrote:
On Mon, Jun 07, 2021 at 10:56:47PM +0800, Tianyu Lan wrote:
These addresses in extra address space works as system memory mirror. The
shared memory with host in Isolation VM needs to be accessed via extra
address space which is above shared gpa boundary.

Why?


The shared_gpa_boundary in the AMD SEV SNP spec is called virtual top of
memory(vTOM). Memory addresses below vTOM are automatically treated as
private while memory above vTOM is treated as shared. Using vTOM to
separate memory in this way avoids the need to augment the standard x86
page tables with C-bit markings, simplifying guest OS software.

Here is the spec link and vTOM description is in the page 14.
https://www.amd.com/system/files/TechDocs/SEV-SNP-strengthening-vm-isolation-with-integrity-protection-and-more.pdf

Thanks.