OvmfPkg/OvmfXen: Switch timer library to support x2APIC mode#12322
OvmfPkg/OvmfXen: Switch timer library to support x2APIC mode#12322d3athjest3r wants to merge 1 commit intotianocore:masterfrom
Conversation
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>
Pull Request Formatting Issues
Address these issues and the validation will automatically re-run when you update your pull request. |
|
Please close this PR and use #12148 to upload new versions of your changes. |
Sorry, I can't. I have deleted the old repo, so it automatically closed the pull request. I had to re-fork the repo and open a new PR. |
Description
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.
new PR based on: #12148
@tperard : I have addressed your comment, and fixed the commit message.
How This Was Tested
Tested with a PVH VM, with the following parameters:
and xl create -c foo.pvh. I see OVMF booting properly. Although I don't see my Linux booting afterwards. I think there is an issue with disk command? It then jumps into the EDKII menu and BIOS settings. It doesn't fail with an error with the timer driver or so. So, I think we should be good for PVH as well.
Integration Instructions
n/a