Re: [PATCH V2 21/28] OvmfPkg: Update PlatformPei to support TDX


Yao, Jiewen
 

We have to relocate based upon best practice.

The mailbox must be in ACPI-NVS. And the ACPI-NVS should be in high memory.

The original mailbox location is in low memory. If we do not relocate to high memory, then the OS will see a hole in low memory.

That is not preferred.

Thank you
Yao Jiewen

-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Gerd
Hoffmann
Sent: Wednesday, October 13, 2021 12:49 PM
To: devel@edk2.groups.io; Xu, Min M <min.m.xu@intel.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>; Justen, Jordan L
<jordan.l.justen@intel.com>; Brijesh Singh <brijesh.singh@amd.com>; Erdem
Aktas <erdemaktas@google.com>; James Bottomley <jejb@linux.ibm.com>;
Yao, Jiewen <jiewen.yao@intel.com>; Tom Lendacky
<thomas.lendacky@amd.com>
Subject: Re: [edk2-devel] [PATCH V2 21/28] OvmfPkg: Update PlatformPei to
support TDX

Hi,

2. Relocate mailbox
At the beginning of system boot, a 4K-aligned, 4K-size memory (Td
mailbox) is pre-allocated by host VMM. BSP & APs do the page accept
together in that memory region.
After that TDVF is designed to relocate the mailbox to a 4K-aligned,
4K-size memory block which is allocated in the ACPI Nvs memory. APs
are waken up and spin around the relocated mailbox waiting for
further command.
Why is the mailbox relocated? Are there any problems when simply
continuing to use the memfd page?

The memfd page location is known to qemu, so when not relocating the
mailbox the MADT update could be done on the host side.

take care,
Gerd




Join devel@edk2.groups.io to automatically receive all group messages.