Re: [PATCH] OvmfPkg/XenPlatformPei: Relocate shared_info page mapping

Laszlo Ersek

On 06/28/21 15:23, Anthony PERARD via wrote:
From: Anthony PERARD <anthony.perard@...>

Unfortunately, Xen isn't ready to deal with mapping at the top of the
physical address space, so we relocate the mapping after the LAPIC

See this thread about the issue with the mapping:

The PhysicalAddressIdentityMapping() call isn't going to do anything
anymore since everything under 4GB is already mapped, but there is no
need to remove the call.

CC: Jan Beulich <JBeulich@...>
CC: Andrew Cooper <andrew.cooper3@...>
Signed-off-by: Anthony PERARD <anthony.perard@...>
OvmfPkg/XenPlatformPei/Xen.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/OvmfPkg/XenPlatformPei/Xen.c b/OvmfPkg/XenPlatformPei/Xen.c
index a4e82b356936..9c6641895970 100644
--- a/OvmfPkg/XenPlatformPei/Xen.c
+++ b/OvmfPkg/XenPlatformPei/Xen.c
@@ -569,7 +569,7 @@ CalibrateLapicTimer (

- SharedInfo = (VOID*)((1ULL << mPhysMemAddressWidth) - EFI_PAGE_SIZE);
+ SharedInfo = (VOID*)((UINTN)PcdGet32 (PcdCpuLocalApicBaseAddress) + SIZE_1MB);
Status = PhysicalAddressIdentityMapping ((EFI_PHYSICAL_ADDRESS)SharedInfo);
if (EFI_ERROR (Status)) {
Acked-by: Laszlo Ersek <lersek@...>

I guess I should merge this after Jan and/or Andrew ack it.


Join { to automatically receive all group messages.