public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH 0/2] SEV-SNP guest support fixes
@ 2023-03-10 17:03 Lendacky, Thomas
  2023-03-10 17:03 ` [PATCH 1/2] UefiCpuPkg/MpInitLib: Ensure SEV-SNP VMSA allocations are not 2MB aligned Lendacky, Thomas
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Lendacky, Thomas @ 2023-03-10 17:03 UTC (permalink / raw)
  To: devel
  Cc: Eric Dong, Ray Ni, Rahul Kumar, Gerd Hoffmann, Michael Roth,
	Ashish Kalra

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@intel.com>
Cc:	Ray Ni <ray.ni@intel.com>
Cc:	Rahul Kumar <rahul1.kumar@intel.com>
Cc:	Gerd Hoffmann <kraxel@redhat.com>
Cc:	Michael Roth <michael.roth@amd.com>
Cc:	Ashish Kalra <Ashish.Kalra@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


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2023-03-13 14:16 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-10 17:03 [PATCH 0/2] SEV-SNP guest support fixes Lendacky, Thomas
2023-03-10 17:03 ` [PATCH 1/2] UefiCpuPkg/MpInitLib: Ensure SEV-SNP VMSA allocations are not 2MB aligned Lendacky, Thomas
2023-03-13  8:00   ` Gerd Hoffmann
2023-03-13  8:31     ` Ni, Ray
2023-03-13 14:15     ` Lendacky, Thomas
2023-03-13  8:28   ` Ni, Ray
2023-03-13  8:45     ` Gerd Hoffmann
2023-03-13  8:47       ` [edk2-devel] " Ni, Ray
2023-03-13 13:42     ` Lendacky, Thomas
2023-03-10 17:04 ` [PATCH 2/2] UefiCpuPkg/MpInitLib: Reuse VMSA allocation to avoid unreserved allocation Lendacky, Thomas
2023-03-10 17:08 ` [PATCH 0/2] SEV-SNP guest support fixes Lendacky, Thomas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox