audk/UefiCpuPkg
Lendacky, Thomas via groups.io 67a6f414aa UefiCpuPkg/MpInitLib: Ensure SEV-SNP VMSA allocations are not 2MB aligned
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4353

Due to AMD erratum #1467, an SEV-SNP VMSA should not be 2MB aligned. To
work around this issue, allocate two pages instead of one. Because of the
way that page allocation is implemented, always try to use the second
page. If the second page is not 2MB aligned, free the first page and use
the second page. If the second page is 2MB aligned, free the second page
and use the first page. Freeing in this way reduces holes in the memory
map.

Fixes: 06544455d0 ("UefiCpuPkg/MpInitLib: Use SEV-SNP AP Creation ...")
Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>

Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Acked-by: Ray Ni <ray.ni@intel.com>
2023-04-01 03:15:51 +00:00
..
Application/Cpuid UefiCpuPkg: Calculate DisplayFamily correctly 2023-03-07 10:42:38 +00:00
CpuDxe UefiCpuPkg/CpuDxe: Substract TME-MK KEY_ID_BITS from CPU max PA 2023-04-01 01:08:34 +00:00
CpuDxeRiscV64 UefiCpuPkg: Add CpuDxeRiscV64 module 2023-02-16 05:53:28 +00:00
CpuFeatures UefiCpuPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
CpuIo2Dxe UefiCpuPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
CpuIo2Smm UefiCpuPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
CpuIoPei UefiCpuPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
CpuMpPei UefiCpuPkg: Enhance logic in InitializeMpExceptionStackSwitchHandlers 2022-08-31 04:23:55 +00:00
CpuS3DataDxe UefiCpuPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
CpuTimerDxeRiscV64 UefiCpuPkg: BaseRiscV64CpuExceptionHandlerLib: clean up 2023-03-08 18:10:34 +00:00
Include UefiCpuPkg: Fix IA32 build failure in CpuPageTableLib.inf 2023-03-27 08:21:58 +00:00
Library UefiCpuPkg/MpInitLib: Ensure SEV-SNP VMSA allocations are not 2MB aligned 2023-04-01 03:15:51 +00:00
MicrocodeMeasurementDxe UefiCpuPkg/MicrocodeMeasurementDxe: Fix exception 2023-03-10 07:13:14 +00:00
PiSmmCommunication UefiCpuPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
PiSmmCpuDxeSmm UefiCpuPkg/PiSmmCpuDxeSmm: fix format string 2023-04-01 03:15:51 +00:00
ResetVector UefiCpuPkg: Supporting S3 in 64bit PEI 2022-12-19 06:12:56 +00:00
SecCore UefiCpuPkg: Remove UefiCpuLib from module INFs. 2023-03-10 08:23:56 +00:00
SecMigrationPei UefiCpuPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
Test UefiCpuPkg/Test: develop UEFI App and dynamic cmd for MP services UT 2022-12-08 10:04:24 +00:00
Universal/Acpi/S3Resume2Pei UefiCpuPkg: Supporting S3 in 64bit PEI 2022-12-19 06:12:56 +00:00
UefiCpuPkg.ci.yaml UefiCpuPkg/UefiCpuPkg.ci.yaml: Ignore RISC-V file 2023-02-16 05:53:28 +00:00
UefiCpuPkg.dec UefiCpuPkg/SmmBaseHob.h: Add SMM Base HOB Data 2023-03-06 06:07:48 +00:00
UefiCpuPkg.dsc UefiCpuPkg: Add CpuDxeRiscV64 module 2023-02-16 05:53:28 +00:00
UefiCpuPkg.uni UefiCpuPkg: Add PCD to control SMRR enable & SmmFeatureControl support 2022-08-31 04:23:55 +00:00
UefiCpuPkgExtra.uni UefiCpuPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:28 -07:00