[edk2-devel] [PATCH 0/2] SEV-SNP guest support fixes

Lendacky, Thomas via groups.io thomas.lendacky=amd.com at groups.io
Fri Mar 10 17:03:58 UTC 2023


This patch series provides some fixes around AP creation:

- An erratum on AMD hardware requires that a VMSA not be aligned on a
  2MB boundary. To work around this issue, allocate 2 pages of memory
  and using the page that is not 2MB aligned and freeing the other.

- When parking APs after exiting boot services, the current SNP support
  will perform an allocation that will not be reflected in memory map
  being supplied to the OS. Instead of allocating new VMSAs each time,
  re-use the current VMSA.

BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4353

---

These patches are based on commit:
f80f052277c8 ("OvmfPkg/RiscVVirt: Add Stack HOB")

Cc:	Eric Dong <eric.dong at intel.com>
Cc:	Ray Ni <ray.ni at intel.com>
Cc:	Rahul Kumar <rahul1.kumar at intel.com>
Cc:	Gerd Hoffmann <kraxel at redhat.com>
Cc:	Michael Roth <michael.roth at amd.com>
Cc:	Ashish Kalra <Ashish.Kalra at amd.com>

Tom Lendacky (2):
  UefiCpuPkg/MpInitLib: Ensure SEV-SNP VMSA allocations are not 2MB
    aligned
  UefiCpuPkg/MpInitLib: Reuse VMSA allocation to avoid unreserved
    allocation

 UefiCpuPkg/Library/MpInitLib/X64/AmdSev.c | 224 ++++++++++++++--------
 1 file changed, 144 insertions(+), 80 deletions(-)

-- 
2.39.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#101007): https://edk2.groups.io/g/devel/message/101007
Mute This Topic: https://groups.io/mt/97524216/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-




More information about the edk2-devel-archive mailing list