From: Min M Xu <min.m...@intel.com> BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4123
VmgExitLib is renamed as CcExitLib. See the description in BZ4123. So OvmfPkg should be updated to this rename. Cc: Brijesh Singh <brijesh.si...@amd.com> Cc: Erdem Aktas <erdemak...@google.com> Cc: Gerd Hoffmann <kra...@redhat.com> Cc: James Bottomley <j...@linux.ibm.com> Cc: Jiewen Yao <jiewen....@intel.com> Cc: Tom Lendacky <thomas.lenda...@amd.com> Signed-off-by: Min Xu <min.m...@intel.com> --- OvmfPkg/AmdSev/AmdSevX64.dsc | 2 -- OvmfPkg/Bhyve/BhyveX64.dsc | 1 - OvmfPkg/CloudHv/CloudHvX64.dsc | 3 --- OvmfPkg/IntelTdx/IntelTdxX64.dsc | 2 -- .../BaseMemEncryptSevLib/DxeMemEncryptSevLib.inf | 2 +- .../BaseMemEncryptSevLib/PeiMemEncryptSevLib.inf | 2 +- .../BaseMemEncryptSevLib/SecMemEncryptSevLib.inf | 2 +- .../X64/SnpPageStateChangeInternal.c | 10 +++++----- OvmfPkg/Microvm/MicrovmX64.dsc | 2 -- OvmfPkg/OvmfPkgIa32.dsc | 2 -- OvmfPkg/OvmfPkgIa32X64.dsc | 2 -- OvmfPkg/OvmfPkgX64.dsc | 3 --- OvmfPkg/OvmfXen.dsc | 1 - OvmfPkg/PlatformPei/AmdSev.c | 10 +++++----- OvmfPkg/PlatformPei/PlatformPei.inf | 2 +- .../FvbServicesRuntimeDxe.inf | 2 +- OvmfPkg/QemuFlashFvbServicesRuntimeDxe/QemuFlashDxe.c | 10 +++++----- 17 files changed, 20 insertions(+), 38 deletions(-) diff --git a/OvmfPkg/AmdSev/AmdSevX64.dsc b/OvmfPkg/AmdSev/AmdSevX64.dsc index 1b324fa48d09..8f7cae787e97 100644 --- a/OvmfPkg/AmdSev/AmdSevX64.dsc +++ b/OvmfPkg/AmdSev/AmdSevX64.dsc @@ -205,7 +205,6 @@ [LibraryClasses.common] BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf CcExitLib|OvmfPkg/Library/CcExitLib/CcExitLib.inf - VmgExitLib|OvmfPkg/Library/VmgExitLib/VmgExitLib.inf TdxLib|MdePkg/Library/TdxLib/TdxLib.inf [LibraryClasses.common.SEC] @@ -231,7 +230,6 @@ CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiCpuExceptionHandlerLib.inf !endif CcExitLib|OvmfPkg/Library/CcExitLib/SecCcExitLib.inf - VmgExitLib|OvmfPkg/Library/VmgExitLib/SecVmgExitLib.inf MemEncryptSevLib|OvmfPkg/Library/BaseMemEncryptSevLib/SecMemEncryptSevLib.inf [LibraryClasses.common.PEI_CORE] diff --git a/OvmfPkg/Bhyve/BhyveX64.dsc b/OvmfPkg/Bhyve/BhyveX64.dsc index 3e90ae365682..e3bb367b6bf6 100644 --- a/OvmfPkg/Bhyve/BhyveX64.dsc +++ b/OvmfPkg/Bhyve/BhyveX64.dsc @@ -233,7 +233,6 @@ [LibraryClasses.common] BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf CcExitLib|UefiCpuPkg/Library/CcExitLibNull/CcExitLibNull.inf - VmgExitLib|UefiCpuPkg/Library/VmgExitLibNull/VmgExitLibNull.inf TdxLib|MdePkg/Library/TdxLib/TdxLib.inf [LibraryClasses.common.SEC] diff --git a/OvmfPkg/CloudHv/CloudHvX64.dsc b/OvmfPkg/CloudHv/CloudHvX64.dsc index 56d061464dbf..ce277cb2398b 100644 --- a/OvmfPkg/CloudHv/CloudHvX64.dsc +++ b/OvmfPkg/CloudHv/CloudHvX64.dsc @@ -252,7 +252,6 @@ [LibraryClasses.common] BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf CcExitLib|OvmfPkg/Library/CcExitLib/CcExitLib.inf - VmgExitLib|OvmfPkg/Library/VmgExitLib/VmgExitLib.inf TdxLib|MdePkg/Library/TdxLib/TdxLib.inf [LibraryClasses.common.SEC] @@ -277,7 +276,6 @@ CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiCpuExceptionHandlerLib.inf !endif CcExitLib|OvmfPkg/Library/CcExitLib/SecCcExitLib.inf - VmgExitLib|OvmfPkg/Library/VmgExitLib/SecVmgExitLib.inf MemEncryptSevLib|OvmfPkg/Library/BaseMemEncryptSevLib/SecMemEncryptSevLib.inf [LibraryClasses.common.PEI_CORE] @@ -918,7 +916,6 @@ OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FvbServicesSmm.inf { <LibraryClasses> CcExitLib|UefiCpuPkg/Library/CcExitLibNull/CcExitLibNull.inf - VmgExitLib|UefiCpuPkg/Library/VmgExitLibNull/VmgExitLibNull.inf } MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmm.inf MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmm.inf { diff --git a/OvmfPkg/IntelTdx/IntelTdxX64.dsc b/OvmfPkg/IntelTdx/IntelTdxX64.dsc index 8c6edfbc2363..345892651520 100644 --- a/OvmfPkg/IntelTdx/IntelTdxX64.dsc +++ b/OvmfPkg/IntelTdx/IntelTdxX64.dsc @@ -216,7 +216,6 @@ [LibraryClasses.common] BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf CcExitLib|OvmfPkg/Library/CcExitLib/CcExitLib.inf - VmgExitLib|OvmfPkg/Library/VmgExitLib/VmgExitLib.inf TdxLib|MdePkg/Library/TdxLib/TdxLib.inf TdxMailboxLib|OvmfPkg/Library/TdxMailboxLib/TdxMailboxLib.inf PlatformInitLib|OvmfPkg/Library/PlatformInitLib/PlatformInitLib.inf @@ -239,7 +238,6 @@ CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiCpuExceptionHandlerLib.inf !endif CcExitLib|OvmfPkg/Library/CcExitLib/SecCcExitLib.inf - VmgExitLib|OvmfPkg/Library/VmgExitLib/SecVmgExitLib.inf MemEncryptSevLib|OvmfPkg/Library/BaseMemEncryptSevLib/SecMemEncryptSevLib.inf PrePiHobListPointerLib|OvmfPkg/IntelTdx/PrePiHobListPointerLibTdx/PrePiHobListPointerLibTdx.inf HobLib|EmbeddedPkg/Library/PrePiHobLib/PrePiHobLib.inf diff --git a/OvmfPkg/Library/BaseMemEncryptSevLib/DxeMemEncryptSevLib.inf b/OvmfPkg/Library/BaseMemEncryptSevLib/DxeMemEncryptSevLib.inf index 35b7d519d938..cc24961c9265 100644 --- a/OvmfPkg/Library/BaseMemEncryptSevLib/DxeMemEncryptSevLib.inf +++ b/OvmfPkg/Library/BaseMemEncryptSevLib/DxeMemEncryptSevLib.inf @@ -51,7 +51,7 @@ DebugLib MemoryAllocationLib PcdLib - VmgExitLib + CcExitLib [FeaturePcd] gUefiOvmfPkgTokenSpaceGuid.PcdSmmSmramRequire diff --git a/OvmfPkg/Library/BaseMemEncryptSevLib/PeiMemEncryptSevLib.inf b/OvmfPkg/Library/BaseMemEncryptSevLib/PeiMemEncryptSevLib.inf index 714da3323765..8f56783da55e 100644 --- a/OvmfPkg/Library/BaseMemEncryptSevLib/PeiMemEncryptSevLib.inf +++ b/OvmfPkg/Library/BaseMemEncryptSevLib/PeiMemEncryptSevLib.inf @@ -51,7 +51,7 @@ DebugLib MemoryAllocationLib PcdLib - VmgExitLib + CcExitLib [FeaturePcd] gUefiOvmfPkgTokenSpaceGuid.PcdSmmSmramRequire diff --git a/OvmfPkg/Library/BaseMemEncryptSevLib/SecMemEncryptSevLib.inf b/OvmfPkg/Library/BaseMemEncryptSevLib/SecMemEncryptSevLib.inf index 284e5acc1177..b6d76e7e630f 100644 --- a/OvmfPkg/Library/BaseMemEncryptSevLib/SecMemEncryptSevLib.inf +++ b/OvmfPkg/Library/BaseMemEncryptSevLib/SecMemEncryptSevLib.inf @@ -48,7 +48,7 @@ CpuLib DebugLib PcdLib - VmgExitLib + CcExitLib [FixedPcd] gUefiCpuPkgTokenSpaceGuid.PcdSevEsWorkAreaBase diff --git a/OvmfPkg/Library/BaseMemEncryptSevLib/X64/SnpPageStateChangeInternal.c b/OvmfPkg/Library/BaseMemEncryptSevLib/X64/SnpPageStateChangeInternal.c index d11aafae8472..7fa39e06a658 100644 --- a/OvmfPkg/Library/BaseMemEncryptSevLib/X64/SnpPageStateChangeInternal.c +++ b/OvmfPkg/Library/BaseMemEncryptSevLib/X64/SnpPageStateChangeInternal.c @@ -13,7 +13,7 @@ #include <Library/BaseMemoryLib.h> #include <Library/MemEncryptSevLib.h> #include <Library/DebugLib.h> -#include <Library/VmgExitLib.h> +#include <Library/CcExitLib.h> #include <Register/Amd/Ghcb.h> #include <Register/Amd/Msr.h> @@ -193,9 +193,9 @@ PageStateChangeVmgExit ( // while (Info->Header.CurrentEntry <= Info->Header.EndEntry) { Ghcb->SaveArea.SwScratch = (UINT64)Ghcb->SharedBuffer; - VmgSetOffsetValid (Ghcb, GhcbSwScratch); + CcExitLibVmgSetOffsetValid (Ghcb, GhcbSwScratch); - Status = VmgExit (Ghcb, SVM_EXIT_SNP_PAGE_STATE_CHANGE, 0, 0); + Status = CcExitLibVmgExit (Ghcb, SVM_EXIT_SNP_PAGE_STATE_CHANGE, 0, 0); // // The Page State Change VMGEXIT can pass the failure through the @@ -251,7 +251,7 @@ InternalSetPageState ( // // Initialize the GHCB // - VmgInit (Ghcb, &InterruptState); + CcExitLibVmgInit (Ghcb, &InterruptState); // // Build the page state structure @@ -293,7 +293,7 @@ InternalSetPageState ( PvalidateRange (Info, CurrentEntry, EndEntry, TRUE); } - VmgDone (Ghcb, InterruptState); + CcExitLibVmgDone (Ghcb, InterruptState); BaseAddress = NextAddress; } diff --git a/OvmfPkg/Microvm/MicrovmX64.dsc b/OvmfPkg/Microvm/MicrovmX64.dsc index 98da7a3c9138..994a02d30107 100644 --- a/OvmfPkg/Microvm/MicrovmX64.dsc +++ b/OvmfPkg/Microvm/MicrovmX64.dsc @@ -250,7 +250,6 @@ [LibraryClasses.common] BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf CcExitLib|OvmfPkg/Library/CcExitLib/CcExitLib.inf - VmgExitLib|OvmfPkg/Library/VmgExitLib/VmgExitLib.inf SerialPortLib|MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.inf PlatformHookLib|MdeModulePkg/Library/BasePlatformHookLibNull/BasePlatformHookLibNull.inf FdtLib|EmbeddedPkg/Library/FdtLib/FdtLib.inf @@ -279,7 +278,6 @@ CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiCpuExceptionHandlerLib.inf !endif CcExitLib|OvmfPkg/Library/CcExitLib/SecCcExitLib.inf - VmgExitLib|OvmfPkg/Library/VmgExitLib/SecVmgExitLib.inf MemEncryptSevLib|OvmfPkg/Library/BaseMemEncryptSevLib/SecMemEncryptSevLib.inf [LibraryClasses.common.PEI_CORE] diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc index ae002b6c9f23..6f774baf90f5 100644 --- a/OvmfPkg/OvmfPkgIa32.dsc +++ b/OvmfPkg/OvmfPkgIa32.dsc @@ -257,7 +257,6 @@ [LibraryClasses.common] BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf CcExitLib|UefiCpuPkg/Library/CcExitLibNull/CcExitLibNull.inf - VmgExitLib|UefiCpuPkg/Library/VmgExitLibNull/VmgExitLibNull.inf [LibraryClasses.common.SEC] TimerLib|OvmfPkg/Library/AcpiTimerLib/BaseRomAcpiTimerLib.inf @@ -985,7 +984,6 @@ # OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FvbServicesSmm.inf { <LibraryClasses> - VmgExitLib|UefiCpuPkg/Library/VmgExitLibNull/VmgExitLibNull.inf CcExitLib|UefiCpuPkg/Library/CcExitLibNull/CcExitLibNull.inf } MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmm.inf diff --git a/OvmfPkg/OvmfPkgIa32X64.dsc b/OvmfPkg/OvmfPkgIa32X64.dsc index 753486bf7798..c851764dec05 100644 --- a/OvmfPkg/OvmfPkgIa32X64.dsc +++ b/OvmfPkg/OvmfPkgIa32X64.dsc @@ -261,7 +261,6 @@ [LibraryClasses.common] BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf CcExitLib|UefiCpuPkg/Library/CcExitLibNull/CcExitLibNull.inf - VmgExitLib|UefiCpuPkg/Library/VmgExitLibNull/VmgExitLibNull.inf TdxLib|MdePkg/Library/TdxLib/TdxLib.inf TdxMailboxLib|OvmfPkg/Library/TdxMailboxLib/TdxMailboxLib.inf @@ -1004,7 +1003,6 @@ OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FvbServicesSmm.inf { <LibraryClasses> CcExitLib|UefiCpuPkg/Library/CcExitLibNull/CcExitLibNull.inf - VmgExitLib|UefiCpuPkg/Library/VmgExitLibNull/VmgExitLibNull.inf } MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmm.inf MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmm.inf { diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc index 61998d33dc78..63c3a47aea30 100644 --- a/OvmfPkg/OvmfPkgX64.dsc +++ b/OvmfPkg/OvmfPkgX64.dsc @@ -277,7 +277,6 @@ [LibraryClasses.common] BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf CcExitLib|OvmfPkg/Library/CcExitLib/CcExitLib.inf - VmgExitLib|OvmfPkg/Library/VmgExitLib/VmgExitLib.inf TdxLib|MdePkg/Library/TdxLib/TdxLib.inf TdxMailboxLib|OvmfPkg/Library/TdxMailboxLib/TdxMailboxLib.inf @@ -304,7 +303,6 @@ CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiCpuExceptionHandlerLib.inf !endif CcExitLib|OvmfPkg/Library/CcExitLib/SecCcExitLib.inf - VmgExitLib|OvmfPkg/Library/VmgExitLib/SecVmgExitLib.inf MemEncryptSevLib|OvmfPkg/Library/BaseMemEncryptSevLib/SecMemEncryptSevLib.inf CcProbeLib|OvmfPkg/Library/CcProbeLib/SecPeiCcProbeLib.inf @@ -1075,7 +1073,6 @@ OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FvbServicesSmm.inf { <LibraryClasses> CcExitLib|UefiCpuPkg/Library/CcExitLibNull/CcExitLibNull.inf - VmgExitLib|UefiCpuPkg/Library/VmgExitLibNull/VmgExitLibNull.inf } MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmm.inf MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmm.inf { diff --git a/OvmfPkg/OvmfXen.dsc b/OvmfPkg/OvmfXen.dsc index ce298bbce25c..8bb497088bd2 100644 --- a/OvmfPkg/OvmfXen.dsc +++ b/OvmfPkg/OvmfXen.dsc @@ -232,7 +232,6 @@ [LibraryClasses.common] BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf CcExitLib|UefiCpuPkg/Library/CcExitLibNull/CcExitLibNull.inf - VmgExitLib|UefiCpuPkg/Library/VmgExitLibNull/VmgExitLibNull.inf TdxLib|MdePkg/Library/TdxLib/TdxLib.inf [LibraryClasses.common.SEC] diff --git a/OvmfPkg/PlatformPei/AmdSev.c b/OvmfPkg/PlatformPei/AmdSev.c index 385562b44c4e..d16db053b012 100644 --- a/OvmfPkg/PlatformPei/AmdSev.c +++ b/OvmfPkg/PlatformPei/AmdSev.c @@ -19,7 +19,7 @@ #include <PiPei.h> #include <Register/Amd/Msr.h> #include <Register/Intel/SmramSaveStateMap.h> -#include <Library/VmgExitLib.h> +#include <Library/CcExitLib.h> #include <ConfidentialComputingGuestAttr.h> #include "Platform.h" @@ -50,7 +50,7 @@ AmdSevSnpInitialize ( } // - // Query the hypervisor feature using the VmgExit and set the value in the + // Query the hypervisor feature using the CcExitLibVmgExit and set the value in the // hypervisor features PCD. // HvFeatures = GetHypervisorFeature (); @@ -129,19 +129,19 @@ GetHypervisorFeature ( // // Initialize the GHCB // - VmgInit (Ghcb, &InterruptState); + CcExitLibVmgInit (Ghcb, &InterruptState); // // Query the Hypervisor Features. // - Status = VmgExit (Ghcb, SVM_EXIT_HYPERVISOR_FEATURES, 0, 0); + Status = CcExitLibVmgExit (Ghcb, SVM_EXIT_HYPERVISOR_FEATURES, 0, 0); if ((Status != 0)) { SevEsProtocolFailure (GHCB_TERMINATE_GHCB_GENERAL); } Features = Ghcb->SaveArea.SwExitInfo2; - VmgDone (Ghcb, InterruptState); + CcExitLibVmgDone (Ghcb, InterruptState); return Features; } diff --git a/OvmfPkg/PlatformPei/PlatformPei.inf b/OvmfPkg/PlatformPei/PlatformPei.inf index 3cd83e6ec3e5..1fadadeb5565 100644 --- a/OvmfPkg/PlatformPei/PlatformPei.inf +++ b/OvmfPkg/PlatformPei/PlatformPei.inf @@ -63,7 +63,7 @@ MtrrLib MemEncryptSevLib PcdLib - VmgExitLib + CcExitLib PlatformInitLib [Pcd] diff --git a/OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FvbServicesRuntimeDxe.inf b/OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FvbServicesRuntimeDxe.inf index 8bb2325157ea..f47170478900 100644 --- a/OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FvbServicesRuntimeDxe.inf +++ b/OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FvbServicesRuntimeDxe.inf @@ -53,7 +53,7 @@ UefiBootServicesTableLib UefiDriverEntryPoint UefiRuntimeLib - VmgExitLib + CcExitLib [Guids] gEfiEventVirtualAddressChangeGuid # ALWAYS_CONSUMED diff --git a/OvmfPkg/QemuFlashFvbServicesRuntimeDxe/QemuFlashDxe.c b/OvmfPkg/QemuFlashFvbServicesRuntimeDxe/QemuFlashDxe.c index 172d6a4267f8..2b3596637e16 100644 --- a/OvmfPkg/QemuFlashFvbServicesRuntimeDxe/QemuFlashDxe.c +++ b/OvmfPkg/QemuFlashFvbServicesRuntimeDxe/QemuFlashDxe.c @@ -11,7 +11,7 @@ #include <Library/UefiRuntimeLib.h> #include <Library/MemEncryptSevLib.h> -#include <Library/VmgExitLib.h> +#include <Library/CcExitLib.h> #include <Register/Amd/Msr.h> #include "QemuFlash.h" @@ -82,12 +82,12 @@ QemuFlashPtrWrite ( // #VC exception. Instead, use the VMGEXIT MMIO write support directly // to perform the update. // - VmgInit (Ghcb, &InterruptState); + CcExitLibVmgInit (Ghcb, &InterruptState); Ghcb->SharedBuffer[0] = Value; Ghcb->SaveArea.SwScratch = (UINT64)(UINTN)Ghcb->SharedBuffer; - VmgSetOffsetValid (Ghcb, GhcbSwScratch); - VmgExit (Ghcb, SVM_EXIT_MMIO_WRITE, PhysAddr, 1); - VmgDone (Ghcb, InterruptState); + CcExitLibVmgSetOffsetValid (Ghcb, GhcbSwScratch); + CcExitLibVmgExit (Ghcb, SVM_EXIT_MMIO_WRITE, PhysAddr, 1); + CcExitLibVmgDone (Ghcb, InterruptState); } else { *Ptr = Value; } -- 2.29.2.windows.2 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#96011): https://edk2.groups.io/g/devel/message/96011 Mute This Topic: https://groups.io/mt/94856331/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-