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: <> On Behalf Of Gerd
Sent: Wednesday, October 13, 2021 12:49 PM
To:; Xu, Min M <>
Cc: Ard Biesheuvel <>; Justen, Jordan L
<>; Brijesh Singh <>; Erdem
Aktas <>; James Bottomley <>;
Yao, Jiewen <>; Tom Lendacky
Subject: Re: [edk2-devel] [PATCH V2 21/28] OvmfPkg: Update PlatformPei to
support TDX


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,

Join to automatically receive all group messages.