This patch series provides fixes around AP startup and sorting:

- The CPUID_EXTENDED_TOPOLOGY CPUID leaf takes a sub-leaf as input. The
  current SEV-SNP support is attempting to retrieve the this leaf with
  sub-leaf 0, but is calling AsmCpuid(), which does not clear ECX before
  invoking the CPUID instruction. Therefore, because of the calling
  convention, the leaf value becomes the sub-leaf value and ends up
  returning incorrect information. Change the call from AsmCpuid() to
  AsmCpuidEx().

- When sorting the CPUs by APIC ID, the VMSA associated with the vCPU
  should follow the APIC ID. Update the sorting code to swap the VMSA
  pointer during the sort.

---

These patches are based on commit:
da219919538b ("BaseTools: GenFw: auto-set nxcompat flag")

Tom Lendacky (2):
  UefiCpuPkg/MpInitLib: Use AsmCpuidEx() for CPUID_EXTENDED_TOPOLOGY
    leaf
  UefiCpuPkg/MpInitLib: Copy SEV-ES save area pointer during APIC ID
    sorting

 UefiCpuPkg/Library/MpInitLib/AmdSev.c | 9 ++++++++-
 UefiCpuPkg/Library/MpInitLib/MpLib.c  | 8 +++++++-
 2 files changed, 15 insertions(+), 2 deletions(-)

-- 
2.42.0



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#110766): https://edk2.groups.io/g/devel/message/110766
Mute This Topic: https://groups.io/mt/102432041/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to