summaryrefslogtreecommitdiffstats
path: root/OvmfPkg/Microvm
diff options
context:
space:
mode:
authorTom Lendacky <thomas.lendacky@amd.com>2024-03-08 07:31:53 -0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2024-04-17 18:30:03 +0000
commit6ced1e91eff13dae1bfba95734e2b34a73601db2 (patch)
tree9d05a7fc0465f13c1c95239facf2d2236d133491 /OvmfPkg/Microvm
parent789727ccf324833fd50daa1d9fb0e7666a8b043a (diff)
downloadedk2-6ced1e91eff13dae1bfba95734e2b34a73601db2.tar.gz
edk2-6ced1e91eff13dae1bfba95734e2b34a73601db2.tar.bz2
edk2-6ced1e91eff13dae1bfba95734e2b34a73601db2.zip
Ovmfpkg/AmdSvsmLib: Create AmdSvsmLib to handle SVSM related services
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4654 Add initial support for the new AmdSvsmLib library to OvmfPkg. The initial implementation fully implements the library interfaces. The SVSM presence check, AmdSvsmIsSvsmPresent(), determines the presence of an SVSM by checking if an SVSM has been advertised in the SEV-SNP Secrets Page. The VMPL API, AmdSvsmSnpGetVmpl(), returns the VMPL level at which OVMF is currently running. The CAA API, AmdSvsmSnpGetCaa(), returns the Calling Area Address when an SVSM is present, 0 otherwise. The PVALIDATE API, AmdSvsmSnpPvalidate(), copies the PVALIDATE logic from the BaseMemEncryptSevLib library for the initial implementation. The BaseMemEncryptSevLib library will be changed to use this new API so that the decision as to whether the SVSM is needed to perform the operation can be isolated to this library. The VMSA API, AmdSvsmSnpVmsaRmpAdjust(), copies the RMPUPDATE logic from the MpInitLib library for the initial implementation. The MpInitLib library will be changed to use this new API so that the decision as to whether the SVSM is needed to perform the operation can be isolated to this library. Cc: Anatol Belski <anbelski@linux.microsoft.com> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Erdem Aktas <erdemaktas@google.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Jianyong Wu <jianyong.wu@arm.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Cc: Michael Roth <michael.roth@amd.com> Cc: Min Xu <min.m.xu@intel.com> Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com> Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'OvmfPkg/Microvm')
-rw-r--r--OvmfPkg/Microvm/MicrovmX64.dsc2
1 files changed, 1 insertions, 1 deletions
diff --git a/OvmfPkg/Microvm/MicrovmX64.dsc b/OvmfPkg/Microvm/MicrovmX64.dsc
index cc84ee3c29..1f2f8b5bb6 100644
--- a/OvmfPkg/Microvm/MicrovmX64.dsc
+++ b/OvmfPkg/Microvm/MicrovmX64.dsc
@@ -246,7 +246,7 @@
!include OvmfPkg/Include/Dsc/ShellLibs.dsc.inc
[LibraryClasses.common]
- AmdSvsmLib|UefiCpuPkg/Library/AmdSvsmLibNull/AmdSvsmLibNull.inf
+ AmdSvsmLib|OvmfPkg/Library/AmdSvsmLib/AmdSvsmLib.inf
BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
CcExitLib|OvmfPkg/Library/CcExitLib/CcExitLib.inf
SerialPortLib|MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.inf