OvmfPkg/OvmfXen: Switch timer library to support x2APIC mode

The SecPeiDxeTimerLibCpu library from the MdePkg accesses the Local APIC
timer exclusively via MMIO and explicitly asserts that x2APIC mode is
not enabled. This causes failures when vCPUs are pre-enabled in x2APIC
mode, which might be necessary for domains with more than 128 vCPUs.
So, this commit switches the TimerLib to SecPeiDxeTimerLibUefiCpu from
the UefiCpuPkg, which delegates APIC mode handling to the LocalApicLib.
OvmfXen already uses BaseXApicX2ApicLib as its LocalApicLib, which
transparently supports both xAPIC (MMIO) and x2APIC (MSR) modes.

Signed-off-by: Julian Vetter <julian.vetter@vates.tech>
This commit is contained in:
Julian Vetter 2026-03-23 10:53:13 +01:00 committed by mergify[bot]
parent cfc02314ac
commit a41ba5ebe1

View file

@ -124,7 +124,7 @@
[LibraryClasses]
PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
TimerLib|MdePkg/Library/SecPeiDxeTimerLibCpu/SecPeiDxeTimerLibCpu.inf
TimerLib|UefiCpuPkg/Library/SecPeiDxeTimerLibUefiCpu/SecPeiDxeTimerLibUefiCpu.inf
ResetSystemLib|OvmfPkg/Library/ResetSystemLib/BaseResetSystemLibXen.inf
PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
BaseMemoryLib|MdePkg/Library/BaseMemoryLibRepStr/BaseMemoryLibRepStr.inf