Branch: refs/heads/master
  Home:   https://github.com/tianocore/edk2
  Commit: 447798cd3a78c8bfc5adb90254d50d22a838b301
      
https://github.com/tianocore/edk2/commit/447798cd3a78c8bfc5adb90254d50d22a838b301
  Author: Tom Lendacky <[email protected]>
  Date:   2023-11-28 (Tue, 28 Nov 2023)

  Changed paths:
    M UefiCpuPkg/Library/MpInitLib/AmdSev.c

  Log Message:
  -----------
  UefiCpuPkg/MpInitLib: Use AsmCpuidEx() for CPUID_EXTENDED_TOPOLOGY leaf

The CPUID_EXTENDED_TOPOLOGY CPUID leaf takes a subleaf as input when
returning CPUID information. However, the AsmCpuid() function does not
zero out ECX before the CPUID instruction, so the input leaf is used as
the sub-leaf for the CPUID request and returns erroneous/invalid CPUID
data, since the intent of the request was to get data related to sub-leaf
0. Instead, use AsmCpuidEx() for the CPUID_EXTENDED_TOPOLOGY leaf.

Fixes: d4d7c9ad5fe5 ("UefiCpuPkg/MpInitLib: use BSP to do extended ...")
Signed-off-by: Tom Lendacky <[email protected]>
Reviewed-by: Ray Ni <[email protected]>


  Commit: 3c5f9ac5c3b92bf63b3c0a39658f0ae991e8436d
      
https://github.com/tianocore/edk2/commit/3c5f9ac5c3b92bf63b3c0a39658f0ae991e8436d
  Author: Tom Lendacky <[email protected]>
  Date:   2023-11-28 (Tue, 28 Nov 2023)

  Changed paths:
    M UefiCpuPkg/Library/MpInitLib/MpLib.c

  Log Message:
  -----------
  UefiCpuPkg/MpInitLib: Copy SEV-ES save area pointer during APIC ID sorting

With SEV-SNP, the SEV-ES save area for a vCPU should be unique to that
vCPU. After commit 3323359a811a, the VMSA allocation was re-used, but when
sorting the CPUs by APIC ID, the save area was not updated to follow the
original CPU. Similar to the StartupApSignal address, the SevEsSaveArea
address should be updated when sorting the CPUs.

This does not cause an issue at this time because all APs are in HLT state
and then are (re)started at the same time, with the same VMSA contents.
However, this should be fixed to account for any change in future
behavior.

Fixes: 3323359a811a ("UefiCpuPkg/MpInitLib: Reuse VMSA allocation to ...")
Signed-off-by: Tom Lendacky <[email protected]>
Reviewed-by: Ray Ni <[email protected]>


Compare: https://github.com/tianocore/edk2/compare/d451bba39968...3c5f9ac5c3b9


_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to