audk/OvmfPkg/Library/BaseMemEncryptSevLib
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
..
Ia32 OvmfPkg/MemEncryptSevLib: add support to validate system RAM 2021-12-09 06:28:10 +00:00
X64 OvmfPkg/MemEncryptSevLib: Fix address overflow during PVALIDATE 2023-12-08 13:25:11 +00:00
DxeMemEncryptSevLib.inf OvmfPkg/UefiCpuPkg/UefiPayloadPkg: Rename VmgExitLib to CcExitLib 2022-11-14 04:55:34 +00:00
DxeMemEncryptSevLibInternal.c OvmfPkg/BaseMemEncryptLib: use the SEV_STATUS MSR value from workarea 2022-02-28 02:46:08 +00:00
PeiDxeMemEncryptSevLibInternal.c OvmfPkg/Include: remove QemuSmramSaveStateMap.h 2023-09-07 15:47:58 +00:00
PeiMemEncryptSevLib.inf OvmfPkg/UefiCpuPkg/UefiPayloadPkg: Rename VmgExitLib to CcExitLib 2022-11-14 04:55:34 +00:00
PeiMemEncryptSevLibInternal.c OvmfPkg: Replace GUEST_TYPE with CC_GUEST_TYPE 2022-04-19 01:26:08 +00:00
SecMemEncryptSevLib.inf OvmfPkg/UefiCpuPkg/UefiPayloadPkg: Rename VmgExitLib to CcExitLib 2022-11-14 04:55:34 +00:00
SecMemEncryptSevLibInternal.c OvmfPkg: Replace GUEST_TYPE with CC_GUEST_TYPE 2022-04-19 01:26:08 +00:00