]> git.proxmox.com Git - mirror_edk2.git/commit
OvmfPkg/BaseMemEncryptLib: use the SEV_STATUS MSR value from workarea
authorBrijesh Singh <brijesh.singh@amd.com>
Mon, 21 Feb 2022 14:59:14 +0000 (22:59 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Mon, 28 Feb 2022 02:46:08 +0000 (02:46 +0000)
commitf1d1c337e7c0575da7fd248b2dd9cffc755940df
tree217381b48a3f3789cc6689215121cdfb068fe047
parent63c50d3ff2854a76432b752af4f2a76f33ff1974
OvmfPkg/BaseMemEncryptLib: use the SEV_STATUS MSR value from workarea

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

Improve the MemEncryptSev{Es,Snp}IsEnabled() to use the SEV_STATUS MSR
value saved in the workarea. Since workarea is valid until the PEI phase,
so, for the Dxe phase use the PcdConfidentialComputingGuestAttr to
determine which SEV technology is enabled.

Cc: Min Xu <min.m.xu@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Tom Lendacky <thomas.lendacky@amd.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Erdem Aktas <erdemaktas@google.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Brijesh Singh <brijesh.singh@amd.com>
Acked-by: Jiewen Yao <jiewen.yao@intel.com>
OvmfPkg/Library/BaseMemEncryptSevLib/DxeMemEncryptSevLib.inf
OvmfPkg/Library/BaseMemEncryptSevLib/DxeMemEncryptSevLibInternal.c
OvmfPkg/Library/BaseMemEncryptSevLib/PeiMemEncryptSevLib.inf
OvmfPkg/Library/BaseMemEncryptSevLib/PeiMemEncryptSevLibInternal.c
OvmfPkg/Library/BaseMemEncryptSevLib/SecMemEncryptSevLib.inf
OvmfPkg/Library/BaseMemEncryptSevLib/SecMemEncryptSevLibInternal.c