audk/OvmfPkg/Library/BaseMemEncryptSevLib/X64
Michael Roth e8c23d1e27 OvmfPkg/MemEncryptSevLib: Fix address overflow during PVALIDATE
The struct used for GHCB-based page-state change requests uses a 40-bit
bit-field for the GFN, which is shifted by PAGE_SHIFT to generate a
64-bit address. However, anything beyond 40-bits simply gets shifted off
when doing this, which will cause issues when dealing with 1TB+
addresses. Fix this by casting the 40-bit GFN values to 64-bit ones
prior to shifting it by PAGE_SHIFT.

Fixes: ade62c18f4 ("OvmfPkg/MemEncryptSevLib: add support to validate system RAM")
Signed-off-by: Michael Roth <michael.roth@amd.com>
Message-Id: <20231115175153.813213-1-michael.roth@amd.com>
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
2023-12-08 13:25:11 +00:00
..
DxeSnpSystemRamValidate.c OvmfPkg: Realize EfiMemoryAcceptProtocol in AmdSevDxe 2023-01-12 16:03:30 +00:00
MemEncryptSevLib.c OvmfPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
PeiDxeVirtualMemory.c OvmfPkg:Remove code that apply AddressEncMask to non-leaf entry 2023-06-30 11:07:40 +05:30
PeiSnpSystemRamValidate.c OvmfPkg/SecMain: validate the memory used for decompressing Fv 2021-12-09 06:28:10 +00:00
SecSnpSystemRamValidate.c OvmfPkg/MemEncryptSevLib: add function to check the VMPL0 2021-12-09 06:28:10 +00:00
SecVirtualMemory.c OvmfPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
SnpPageStateChange.h OvmfPkg/MemEncryptSevLib: add function to check the VMPL0 2021-12-09 06:28:10 +00:00
SnpPageStateChangeInternal.c OvmfPkg/MemEncryptSevLib: Fix address overflow during PVALIDATE 2023-12-08 13:25:11 +00:00
VirtualMemory.c OvmfPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
VirtualMemory.h OvmfPkg/MemEncryptSevLib: add support to validate > 4GB memory in PEI phase 2021-12-09 06:28:10 +00:00