summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--OvmfPkg/AmdSev/AmdSevX64.dsc4
-rw-r--r--OvmfPkg/Bhyve/BhyveX64.dsc2
-rw-r--r--OvmfPkg/CloudHv/CloudHvX64.dsc6
-rw-r--r--OvmfPkg/IntelTdx/IntelTdxX64.dsc4
-rw-r--r--OvmfPkg/Library/BaseMemEncryptSevLib/DxeMemEncryptSevLib.inf2
-rw-r--r--OvmfPkg/Library/BaseMemEncryptSevLib/PeiMemEncryptSevLib.inf2
-rw-r--r--OvmfPkg/Library/BaseMemEncryptSevLib/SecMemEncryptSevLib.inf2
-rw-r--r--OvmfPkg/Library/BaseMemEncryptSevLib/X64/SnpPageStateChangeInternal.c2
-rw-r--r--OvmfPkg/Library/CcExitLib/CcExitLib.c (renamed from OvmfPkg/Library/VmgExitLib/VmgExitLib.c)5
-rw-r--r--OvmfPkg/Library/CcExitLib/CcExitLib.inf (renamed from OvmfPkg/Library/VmgExitLib/VmgExitLib.inf)17
-rw-r--r--OvmfPkg/Library/CcExitLib/CcExitTd.h (renamed from OvmfPkg/Library/VmgExitLib/VmTdExitHandler.h)4
-rw-r--r--OvmfPkg/Library/CcExitLib/CcExitVcHandler.c (renamed from OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c)5
-rw-r--r--OvmfPkg/Library/CcExitLib/CcExitVcHandler.h (renamed from OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.h)6
-rw-r--r--OvmfPkg/Library/CcExitLib/CcExitVeHandler.c (renamed from OvmfPkg/Library/VmgExitLib/VmTdExitVeHandler.c)4
-rw-r--r--OvmfPkg/Library/CcExitLib/PeiDxeCcExitVcHandler.c (renamed from OvmfPkg/Library/VmgExitLib/PeiDxeVmgExitVcHandler.c)4
-rw-r--r--OvmfPkg/Library/CcExitLib/SecCcExitLib.inf (renamed from OvmfPkg/Library/VmgExitLib/SecVmgExitLib.inf)14
-rw-r--r--OvmfPkg/Library/CcExitLib/SecCcExitVcHandler.c (renamed from OvmfPkg/Library/VmgExitLib/SecVmgExitVcHandler.c)4
-rw-r--r--OvmfPkg/Library/CcExitLib/X64/TdVmcallCpuid.nasm (renamed from OvmfPkg/Library/VmgExitLib/X64/TdVmcallCpuid.nasm)0
-rw-r--r--OvmfPkg/Microvm/MicrovmX64.dsc4
-rw-r--r--OvmfPkg/OvmfPkgIa32.dsc4
-rw-r--r--OvmfPkg/OvmfPkgIa32X64.dsc4
-rw-r--r--OvmfPkg/OvmfPkgX64.dsc6
-rw-r--r--OvmfPkg/OvmfXen.dsc2
-rw-r--r--OvmfPkg/PlatformPei/AmdSev.c2
-rw-r--r--OvmfPkg/PlatformPei/PlatformPei.inf2
-rw-r--r--OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FvbServicesRuntimeDxe.inf2
-rw-r--r--OvmfPkg/QemuFlashFvbServicesRuntimeDxe/QemuFlashDxe.c2
-rw-r--r--UefiCpuPkg/Include/Library/CcExitLib.h (renamed from UefiCpuPkg/Include/Library/VmgExitLib.h)13
-rw-r--r--UefiCpuPkg/Library/CcExitLibNull/CcExitLibNull.c (renamed from UefiCpuPkg/Library/VmgExitLibNull/VmgExitLibNull.c)33
-rw-r--r--UefiCpuPkg/Library/CcExitLibNull/CcExitLibNull.inf (renamed from UefiCpuPkg/Library/VmgExitLibNull/VmgExitLibNull.inf)12
-rw-r--r--UefiCpuPkg/Library/CcExitLibNull/CcExitLibNull.uni14
-rw-r--r--UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeCpuExceptionHandlerLib.inf2
-rw-r--r--UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiCpuExceptionHandlerLib.inf2
-rw-r--r--UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiDxeSmmCpuException.c2
-rw-r--r--UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiCpuException.c2
-rw-r--r--UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiCpuExceptionHandlerLib.inf2
-rw-r--r--UefiCpuPkg/Library/CpuExceptionHandlerLib/SmmCpuExceptionHandlerLib.inf2
-rw-r--r--UefiCpuPkg/Library/CpuExceptionHandlerLib/Xcode5SecPeiCpuExceptionHandlerLib.inf2
-rw-r--r--UefiCpuPkg/Library/MpInitLib/AmdSev.c2
-rw-r--r--UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf2
-rw-r--r--UefiCpuPkg/Library/MpInitLib/DxeMpLib.c2
-rw-r--r--UefiCpuPkg/Library/MpInitLib/MpLib.c2
-rw-r--r--UefiCpuPkg/Library/MpInitLib/PeiMpInitLib.inf2
-rw-r--r--UefiCpuPkg/Library/MpInitLib/X64/AmdSev.c2
-rw-r--r--UefiCpuPkg/Library/VmgExitLibNull/VmTdExitNull.c38
-rw-r--r--UefiCpuPkg/Library/VmgExitLibNull/VmgExitLibNull.uni15
-rw-r--r--UefiCpuPkg/UefiCpuPkg.dec4
-rw-r--r--UefiCpuPkg/UefiCpuPkg.dsc4
-rw-r--r--UefiPayloadPkg/UefiPayloadPkg.dsc2
49 files changed, 135 insertions, 141 deletions
diff --git a/OvmfPkg/AmdSev/AmdSevX64.dsc b/OvmfPkg/AmdSev/AmdSevX64.dsc
index 90e8a213ef..8f7cae787e 100644
--- a/OvmfPkg/AmdSev/AmdSevX64.dsc
+++ b/OvmfPkg/AmdSev/AmdSevX64.dsc
@@ -204,7 +204,7 @@
[LibraryClasses.common]
BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
- VmgExitLib|OvmfPkg/Library/VmgExitLib/VmgExitLib.inf
+ CcExitLib|OvmfPkg/Library/CcExitLib/CcExitLib.inf
TdxLib|MdePkg/Library/TdxLib/TdxLib.inf
[LibraryClasses.common.SEC]
@@ -229,7 +229,7 @@
!else
CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiCpuExceptionHandlerLib.inf
!endif
- VmgExitLib|OvmfPkg/Library/VmgExitLib/SecVmgExitLib.inf
+ CcExitLib|OvmfPkg/Library/CcExitLib/SecCcExitLib.inf
MemEncryptSevLib|OvmfPkg/Library/BaseMemEncryptSevLib/SecMemEncryptSevLib.inf
[LibraryClasses.common.PEI_CORE]
diff --git a/OvmfPkg/Bhyve/BhyveX64.dsc b/OvmfPkg/Bhyve/BhyveX64.dsc
index 475b88b21a..e3bb367b6b 100644
--- a/OvmfPkg/Bhyve/BhyveX64.dsc
+++ b/OvmfPkg/Bhyve/BhyveX64.dsc
@@ -232,7 +232,7 @@
[LibraryClasses.common]
BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
- VmgExitLib|UefiCpuPkg/Library/VmgExitLibNull/VmgExitLibNull.inf
+ CcExitLib|UefiCpuPkg/Library/CcExitLibNull/CcExitLibNull.inf
TdxLib|MdePkg/Library/TdxLib/TdxLib.inf
[LibraryClasses.common.SEC]
diff --git a/OvmfPkg/CloudHv/CloudHvX64.dsc b/OvmfPkg/CloudHv/CloudHvX64.dsc
index 10b16104ac..ce277cb239 100644
--- a/OvmfPkg/CloudHv/CloudHvX64.dsc
+++ b/OvmfPkg/CloudHv/CloudHvX64.dsc
@@ -251,7 +251,7 @@
[LibraryClasses.common]
BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
- VmgExitLib|OvmfPkg/Library/VmgExitLib/VmgExitLib.inf
+ CcExitLib|OvmfPkg/Library/CcExitLib/CcExitLib.inf
TdxLib|MdePkg/Library/TdxLib/TdxLib.inf
[LibraryClasses.common.SEC]
@@ -275,7 +275,7 @@
!else
CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiCpuExceptionHandlerLib.inf
!endif
- VmgExitLib|OvmfPkg/Library/VmgExitLib/SecVmgExitLib.inf
+ CcExitLib|OvmfPkg/Library/CcExitLib/SecCcExitLib.inf
MemEncryptSevLib|OvmfPkg/Library/BaseMemEncryptSevLib/SecMemEncryptSevLib.inf
[LibraryClasses.common.PEI_CORE]
@@ -915,7 +915,7 @@
#
OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FvbServicesSmm.inf {
<LibraryClasses>
- VmgExitLib|UefiCpuPkg/Library/VmgExitLibNull/VmgExitLibNull.inf
+ CcExitLib|UefiCpuPkg/Library/CcExitLibNull/CcExitLibNull.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 c0c1a15b09..3458926515 100644
--- a/OvmfPkg/IntelTdx/IntelTdxX64.dsc
+++ b/OvmfPkg/IntelTdx/IntelTdxX64.dsc
@@ -215,7 +215,7 @@
[LibraryClasses.common]
BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
- VmgExitLib|OvmfPkg/Library/VmgExitLib/VmgExitLib.inf
+ CcExitLib|OvmfPkg/Library/CcExitLib/CcExitLib.inf
TdxLib|MdePkg/Library/TdxLib/TdxLib.inf
TdxMailboxLib|OvmfPkg/Library/TdxMailboxLib/TdxMailboxLib.inf
PlatformInitLib|OvmfPkg/Library/PlatformInitLib/PlatformInitLib.inf
@@ -237,7 +237,7 @@
!else
CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiCpuExceptionHandlerLib.inf
!endif
- VmgExitLib|OvmfPkg/Library/VmgExitLib/SecVmgExitLib.inf
+ CcExitLib|OvmfPkg/Library/CcExitLib/SecCcExitLib.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 35b7d519d9..cc24961c92 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 714da33237..8f56783da5 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 284e5acc11..b6d76e7e63 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 d11aafae84..73698a7b9d 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>
diff --git a/OvmfPkg/Library/VmgExitLib/VmgExitLib.c b/OvmfPkg/Library/CcExitLib/CcExitLib.c
index c205521870..477064cde2 100644
--- a/OvmfPkg/Library/VmgExitLib/VmgExitLib.c
+++ b/OvmfPkg/Library/CcExitLib/CcExitLib.c
@@ -1,7 +1,8 @@
/** @file
- VMGEXIT Support Library.
+ CcExitLib Support Library.
Copyright (C) 2020, Advanced Micro Devices, Inc. All rights reserved.<BR>
+ Copyright (C) 2020 - 2022, Intel Corporation. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
@@ -9,7 +10,7 @@
#include <Base.h>
#include <Uefi.h>
#include <Library/BaseMemoryLib.h>
-#include <Library/VmgExitLib.h>
+#include <Library/CcExitLib.h>
#include <Register/Amd/Msr.h>
/**
diff --git a/OvmfPkg/Library/VmgExitLib/VmgExitLib.inf b/OvmfPkg/Library/CcExitLib/CcExitLib.inf
index 255b0c1a2f..131fa62675 100644
--- a/OvmfPkg/Library/VmgExitLib/VmgExitLib.inf
+++ b/OvmfPkg/Library/CcExitLib/CcExitLib.inf
@@ -1,18 +1,19 @@
## @file
-# VMGEXIT Support Library.
+# CcExitLib Library.
#
# Copyright (C) 2020, Advanced Micro Devices, Inc. All rights reserved.<BR>
+# Copyright (C) 2020 - 2022, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
[Defines]
INF_VERSION = 0x00010005
- BASE_NAME = VmgExitLib
+ BASE_NAME = CcExitLib
FILE_GUID = 0e923c25-13cd-430b-8714-ffe85652a97b
MODULE_TYPE = BASE
VERSION_STRING = 1.0
- LIBRARY_CLASS = VmgExitLib|PEIM DXE_CORE DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SMM_DRIVER UEFI_DRIVER
+ LIBRARY_CLASS = CcExitLib|PEIM DXE_CORE DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SMM_DRIVER UEFI_DRIVER
#
# The following information is for reference only and not required by the build tools.
@@ -21,11 +22,11 @@
#
[Sources.common]
- VmgExitLib.c
- VmgExitVcHandler.c
- VmgExitVcHandler.h
- PeiDxeVmgExitVcHandler.c
- VmTdExitVeHandler.c
+ CcExitLib.c
+ CcExitVcHandler.c
+ CcExitVcHandler.h
+ PeiDxeCcExitVcHandler.c
+ CcExitVeHandler.c
X64/TdVmcallCpuid.nasm
[Packages]
diff --git a/OvmfPkg/Library/VmgExitLib/VmTdExitHandler.h b/OvmfPkg/Library/CcExitLib/CcExitTd.h
index 7eacd0872f..013a55e207 100644
--- a/OvmfPkg/Library/VmgExitLib/VmTdExitHandler.h
+++ b/OvmfPkg/Library/CcExitLib/CcExitTd.h
@@ -5,8 +5,8 @@
**/
-#ifndef VMTD_EXIT_HANDLER_H_
-#define VMTD_EXIT_HANDLER_H_
+#ifndef CC_EXIT_TD_H_
+#define CC_EXIT_TD_H_
#include <Base.h>
#include <Uefi.h>
diff --git a/OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c b/OvmfPkg/Library/CcExitLib/CcExitVcHandler.c
index a4393dffbd..ad2a922c9f 100644
--- a/OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c
+++ b/OvmfPkg/Library/CcExitLib/CcExitVcHandler.c
@@ -11,13 +11,12 @@
#include <Library/BaseMemoryLib.h>
#include <Library/LocalApicLib.h>
#include <Library/MemEncryptSevLib.h>
-#include <Library/VmgExitLib.h>
+#include <Library/CcExitLib.h>
#include <Register/Amd/Msr.h>
#include <Register/Intel/Cpuid.h>
#include <IndustryStandard/InstructionParsing.h>
-#include "VmgExitVcHandler.h"
-// #include <Library/MemEncryptSevLib.h>
+#include "CcExitVcHandler.h"
//
// Instruction execution mode definition
diff --git a/OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.h b/OvmfPkg/Library/CcExitLib/CcExitVcHandler.h
index 3a37cb04f6..464591fcb7 100644
--- a/OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.h
+++ b/OvmfPkg/Library/CcExitLib/CcExitVcHandler.h
@@ -6,12 +6,12 @@
**/
-#ifndef __VMG_EXIT_VC_HANDLER_H__
-#define __VMG_EXIT_VC_HANDLER_H__
+#ifndef CC_EXIT_VC_HANDLER_H_
+#define CC_EXIT_VC_HANDLER_H_
#include <Base.h>
#include <Uefi.h>
-#include <Library/VmgExitLib.h>
+#include <Library/CcExitLib.h>
/**
Handle a #VC exception.
diff --git a/OvmfPkg/Library/VmgExitLib/VmTdExitVeHandler.c b/OvmfPkg/Library/CcExitLib/CcExitVeHandler.c
index c89268c5d8..08e92c66ce 100644
--- a/OvmfPkg/Library/VmgExitLib/VmTdExitVeHandler.c
+++ b/OvmfPkg/Library/CcExitLib/CcExitVeHandler.c
@@ -8,8 +8,8 @@
#include <Library/BaseLib.h>
#include <Library/DebugLib.h>
-#include "VmTdExitHandler.h"
-#include <Library/VmgExitLib.h>
+#include "CcExitTd.h"
+#include <Library/CcExitLib.h>
#include <Library/BaseMemoryLib.h>
#include <IndustryStandard/Tdx.h>
#include <IndustryStandard/InstructionParsing.h>
diff --git a/OvmfPkg/Library/VmgExitLib/PeiDxeVmgExitVcHandler.c b/OvmfPkg/Library/CcExitLib/PeiDxeCcExitVcHandler.c
index e3d0715837..bb718161f5 100644
--- a/OvmfPkg/Library/VmgExitLib/PeiDxeVmgExitVcHandler.c
+++ b/OvmfPkg/Library/CcExitLib/PeiDxeCcExitVcHandler.c
@@ -10,10 +10,10 @@
#include <Uefi.h>
#include <Library/BaseMemoryLib.h>
#include <Library/MemEncryptSevLib.h>
-#include <Library/VmgExitLib.h>
+#include <Library/CcExitLib.h>
#include <Register/Amd/Msr.h>
-#include "VmgExitVcHandler.h"
+#include "CcExitVcHandler.h"
/**
Handle a #VC exception.
diff --git a/OvmfPkg/Library/VmgExitLib/SecVmgExitLib.inf b/OvmfPkg/Library/CcExitLib/SecCcExitLib.inf
index f9bd4974f6..1ee22ce0ae 100644
--- a/OvmfPkg/Library/VmgExitLib/SecVmgExitLib.inf
+++ b/OvmfPkg/Library/CcExitLib/SecCcExitLib.inf
@@ -8,11 +8,11 @@
[Defines]
INF_VERSION = 0x00010005
- BASE_NAME = SecVmgExitLib
+ BASE_NAME = SecCcExitLib
FILE_GUID = dafff819-f86c-4cff-a70e-83161e5bcf9a
MODULE_TYPE = BASE
VERSION_STRING = 1.0
- LIBRARY_CLASS = VmgExitLib|SEC
+ LIBRARY_CLASS = CcExitLib|SEC
#
# The following information is for reference only and not required by the build tools.
@@ -21,11 +21,11 @@
#
[Sources.common]
- VmgExitLib.c
- VmgExitVcHandler.c
- VmgExitVcHandler.h
- SecVmgExitVcHandler.c
- VmTdExitVeHandler.c
+ CcExitLib.c
+ CcExitVcHandler.c
+ CcExitVcHandler.h
+ SecCcExitVcHandler.c
+ CcExitVeHandler.c
X64/TdVmcallCpuid.nasm
[Packages]
diff --git a/OvmfPkg/Library/VmgExitLib/SecVmgExitVcHandler.c b/OvmfPkg/Library/CcExitLib/SecCcExitVcHandler.c
index fe8680f831..769e0b5b74 100644
--- a/OvmfPkg/Library/VmgExitLib/SecVmgExitVcHandler.c
+++ b/OvmfPkg/Library/CcExitLib/SecCcExitVcHandler.c
@@ -10,10 +10,10 @@
#include <Uefi.h>
#include <Library/BaseMemoryLib.h>
#include <Library/MemEncryptSevLib.h>
-#include <Library/VmgExitLib.h>
+#include <Library/CcExitLib.h>
#include <Register/Amd/Msr.h>
-#include "VmgExitVcHandler.h"
+#include "CcExitVcHandler.h"
/**
Handle a #VC exception.
diff --git a/OvmfPkg/Library/VmgExitLib/X64/TdVmcallCpuid.nasm b/OvmfPkg/Library/CcExitLib/X64/TdVmcallCpuid.nasm
index fa86440904..fa86440904 100644
--- a/OvmfPkg/Library/VmgExitLib/X64/TdVmcallCpuid.nasm
+++ b/OvmfPkg/Library/CcExitLib/X64/TdVmcallCpuid.nasm
diff --git a/OvmfPkg/Microvm/MicrovmX64.dsc b/OvmfPkg/Microvm/MicrovmX64.dsc
index 7eff8e2a88..994a02d301 100644
--- a/OvmfPkg/Microvm/MicrovmX64.dsc
+++ b/OvmfPkg/Microvm/MicrovmX64.dsc
@@ -249,7 +249,7 @@
[LibraryClasses.common]
BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
- VmgExitLib|OvmfPkg/Library/VmgExitLib/VmgExitLib.inf
+ CcExitLib|OvmfPkg/Library/CcExitLib/CcExitLib.inf
SerialPortLib|MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.inf
PlatformHookLib|MdeModulePkg/Library/BasePlatformHookLibNull/BasePlatformHookLibNull.inf
FdtLib|EmbeddedPkg/Library/FdtLib/FdtLib.inf
@@ -277,7 +277,7 @@
!else
CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiCpuExceptionHandlerLib.inf
!endif
- VmgExitLib|OvmfPkg/Library/VmgExitLib/SecVmgExitLib.inf
+ CcExitLib|OvmfPkg/Library/CcExitLib/SecCcExitLib.inf
MemEncryptSevLib|OvmfPkg/Library/BaseMemEncryptSevLib/SecMemEncryptSevLib.inf
[LibraryClasses.common.PEI_CORE]
diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc
index e9ba491237..6f774baf90 100644
--- a/OvmfPkg/OvmfPkgIa32.dsc
+++ b/OvmfPkg/OvmfPkgIa32.dsc
@@ -256,7 +256,7 @@
[LibraryClasses.common]
BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
- VmgExitLib|UefiCpuPkg/Library/VmgExitLibNull/VmgExitLibNull.inf
+ CcExitLib|UefiCpuPkg/Library/CcExitLibNull/CcExitLibNull.inf
[LibraryClasses.common.SEC]
TimerLib|OvmfPkg/Library/AcpiTimerLib/BaseRomAcpiTimerLib.inf
@@ -984,7 +984,7 @@
#
OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FvbServicesSmm.inf {
<LibraryClasses>
- VmgExitLib|UefiCpuPkg/Library/VmgExitLibNull/VmgExitLibNull.inf
+ CcExitLib|UefiCpuPkg/Library/CcExitLibNull/CcExitLibNull.inf
}
MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmm.inf
MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmm.inf {
diff --git a/OvmfPkg/OvmfPkgIa32X64.dsc b/OvmfPkg/OvmfPkgIa32X64.dsc
index af566b953f..c851764dec 100644
--- a/OvmfPkg/OvmfPkgIa32X64.dsc
+++ b/OvmfPkg/OvmfPkgIa32X64.dsc
@@ -260,7 +260,7 @@
[LibraryClasses.common]
BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
- VmgExitLib|UefiCpuPkg/Library/VmgExitLibNull/VmgExitLibNull.inf
+ CcExitLib|UefiCpuPkg/Library/CcExitLibNull/CcExitLibNull.inf
TdxLib|MdePkg/Library/TdxLib/TdxLib.inf
TdxMailboxLib|OvmfPkg/Library/TdxMailboxLib/TdxMailboxLib.inf
@@ -1002,7 +1002,7 @@
#
OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FvbServicesSmm.inf {
<LibraryClasses>
- VmgExitLib|UefiCpuPkg/Library/VmgExitLibNull/VmgExitLibNull.inf
+ CcExitLib|UefiCpuPkg/Library/CcExitLibNull/CcExitLibNull.inf
}
MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmm.inf
MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmm.inf {
diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc
index f39d9cd117..63c3a47aea 100644
--- a/OvmfPkg/OvmfPkgX64.dsc
+++ b/OvmfPkg/OvmfPkgX64.dsc
@@ -276,7 +276,7 @@
[LibraryClasses.common]
BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
- VmgExitLib|OvmfPkg/Library/VmgExitLib/VmgExitLib.inf
+ CcExitLib|OvmfPkg/Library/CcExitLib/CcExitLib.inf
TdxLib|MdePkg/Library/TdxLib/TdxLib.inf
TdxMailboxLib|OvmfPkg/Library/TdxMailboxLib/TdxMailboxLib.inf
@@ -302,7 +302,7 @@
!else
CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiCpuExceptionHandlerLib.inf
!endif
- VmgExitLib|OvmfPkg/Library/VmgExitLib/SecVmgExitLib.inf
+ CcExitLib|OvmfPkg/Library/CcExitLib/SecCcExitLib.inf
MemEncryptSevLib|OvmfPkg/Library/BaseMemEncryptSevLib/SecMemEncryptSevLib.inf
CcProbeLib|OvmfPkg/Library/CcProbeLib/SecPeiCcProbeLib.inf
@@ -1072,7 +1072,7 @@
#
OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FvbServicesSmm.inf {
<LibraryClasses>
- VmgExitLib|UefiCpuPkg/Library/VmgExitLibNull/VmgExitLibNull.inf
+ CcExitLib|UefiCpuPkg/Library/CcExitLibNull/CcExitLibNull.inf
}
MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmm.inf
MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmm.inf {
diff --git a/OvmfPkg/OvmfXen.dsc b/OvmfPkg/OvmfXen.dsc
index 58a7c97cdd..8bb497088b 100644
--- a/OvmfPkg/OvmfXen.dsc
+++ b/OvmfPkg/OvmfXen.dsc
@@ -231,7 +231,7 @@
[LibraryClasses.common]
BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
- VmgExitLib|UefiCpuPkg/Library/VmgExitLibNull/VmgExitLibNull.inf
+ CcExitLib|UefiCpuPkg/Library/CcExitLibNull/CcExitLibNull.inf
TdxLib|MdePkg/Library/TdxLib/TdxLib.inf
[LibraryClasses.common.SEC]
diff --git a/OvmfPkg/PlatformPei/AmdSev.c b/OvmfPkg/PlatformPei/AmdSev.c
index 385562b44c..80a1194ffc 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"
diff --git a/OvmfPkg/PlatformPei/PlatformPei.inf b/OvmfPkg/PlatformPei/PlatformPei.inf
index 3cd83e6ec3..1fadadeb55 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 8bb2325157..f471704789 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 172d6a4267..58bcad825d 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"
diff --git a/UefiCpuPkg/Include/Library/VmgExitLib.h b/UefiCpuPkg/Include/Library/CcExitLib.h
index f9f911099a..1ae618c19b 100644
--- a/UefiCpuPkg/Include/Library/VmgExitLib.h
+++ b/UefiCpuPkg/Include/Library/CcExitLib.h
@@ -1,16 +1,19 @@
/** @file
- Public header file for the VMGEXIT Support library class.
+ Public header file for the CcExitLib.
- This library class defines some routines used when invoking the VMGEXIT
- instruction in support of SEV-ES and to handle #VC exceptions.
+ This library class defines some routines used for below CcExit handler.
+ - Invoking the VMGEXIT instruction in support of SEV-ES and to handle
+ #VC exceptions.
+ - Handle #VE exception in TDX.
Copyright (C) 2020, Advanced Micro Devices, Inc. All rights reserved.<BR>
+ Copyright (c) 2020 - 2022, Intel Corporation. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
-#ifndef __VMG_EXIT_LIB_H__
-#define __VMG_EXIT_LIB_H__
+#ifndef CC_EXIT_LIB_H_
+#define CC_EXIT_LIB_H_
#include <Protocol/DebugSupport.h>
#include <Register/Amd/Ghcb.h>
diff --git a/UefiCpuPkg/Library/VmgExitLibNull/VmgExitLibNull.c b/UefiCpuPkg/Library/CcExitLibNull/CcExitLibNull.c
index d661d85974..79eca74e13 100644
--- a/UefiCpuPkg/Library/VmgExitLibNull/VmgExitLibNull.c
+++ b/UefiCpuPkg/Library/CcExitLibNull/CcExitLibNull.c
@@ -1,14 +1,15 @@
/** @file
- VMGEXIT Base Support Library.
+ CcExit Base Support Library.
Copyright (C) 2020, Advanced Micro Devices, Inc. All rights reserved.<BR>
+ Copyright (c) 2020 - 2022, Intel Corporation. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
#include <Base.h>
#include <Uefi.h>
-#include <Library/VmgExitLib.h>
+#include <Library/CcExitLib.h>
/**
Perform VMGEXIT.
@@ -163,3 +164,31 @@ VmgExitHandleVc (
return EFI_UNSUPPORTED;
}
+
+/**
+ Handle a #VE exception.
+
+ Performs the necessary processing to handle a #VE exception.
+
+ @param[in, out] ExceptionType Pointer to an EFI_EXCEPTION_TYPE to be set
+ as value to use on error.
+ @param[in, out] SystemContext Pointer to EFI_SYSTEM_CONTEXT
+
+ @retval EFI_SUCCESS Exception handled
+ @retval EFI_UNSUPPORTED #VE not supported, (new) exception value to
+ propagate provided
+ @retval EFI_PROTOCOL_ERROR #VE handling failed, (new) exception value to
+ propagate provided
+
+**/
+EFI_STATUS
+EFIAPI
+VmTdExitHandleVe (
+ IN OUT EFI_EXCEPTION_TYPE *ExceptionType,
+ IN OUT EFI_SYSTEM_CONTEXT SystemContext
+ )
+{
+ *ExceptionType = VE_EXCEPTION;
+
+ return EFI_UNSUPPORTED;
+}
diff --git a/UefiCpuPkg/Library/VmgExitLibNull/VmgExitLibNull.inf b/UefiCpuPkg/Library/CcExitLibNull/CcExitLibNull.inf
index 4aab601939..ed7f611cbc 100644
--- a/UefiCpuPkg/Library/VmgExitLibNull/VmgExitLibNull.inf
+++ b/UefiCpuPkg/Library/CcExitLibNull/CcExitLibNull.inf
@@ -1,23 +1,23 @@
## @file
-# VMGEXIT Support Library.
+# CcExit Base Support Library.
#
# Copyright (C) 2020, Advanced Micro Devices, Inc. All rights reserved.<BR>
+# Copyright (c) 2020 - 2022, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
[Defines]
INF_VERSION = 0x00010005
- BASE_NAME = VmgExitLibNull
- MODULE_UNI_FILE = VmgExitLibNull.uni
+ BASE_NAME = CcExitLibNull
+ MODULE_UNI_FILE = CcExitLibNull.uni
FILE_GUID = 3cd7368f-ef9b-4a9b-9571-2ed93813677e
MODULE_TYPE = BASE
VERSION_STRING = 1.0
- LIBRARY_CLASS = VmgExitLib
+ LIBRARY_CLASS = CcExitLib
[Sources.common]
- VmgExitLibNull.c
- VmTdExitNull.c
+ CcExitLibNull.c
[Packages]
MdePkg/MdePkg.dec
diff --git a/UefiCpuPkg/Library/CcExitLibNull/CcExitLibNull.uni b/UefiCpuPkg/Library/CcExitLibNull/CcExitLibNull.uni
new file mode 100644
index 0000000000..b18ae8792e
--- /dev/null
+++ b/UefiCpuPkg/Library/CcExitLibNull/CcExitLibNull.uni
@@ -0,0 +1,14 @@
+// /** @file
+// CcExitLib instance.
+//
+// Copyright (C) 2020, Advanced Micro Devices, Inc. All rights reserved.<BR>
+// Copyright (c) 2020 - 2022, Intel Corporation. All rights reserved.<BR>
+// SPDX-License-Identifier: BSD-2-Clause-Patent
+//
+// **/
+
+
+#string STR_MODULE_ABSTRACT #language en-US "CcExitLib NULL instance"
+
+#string STR_MODULE_DESCRIPTION #language en-US "CcExitLib NULL instance."
+
diff --git a/UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeCpuExceptionHandlerLib.inf b/UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeCpuExceptionHandlerLib.inf
index e7a81bebdb..d0f82095cf 100644
--- a/UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeCpuExceptionHandlerLib.inf
+++ b/UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeCpuExceptionHandlerLib.inf
@@ -60,4 +60,4 @@
PeCoffGetEntryPointLib
MemoryAllocationLib
DebugLib
- VmgExitLib
+ CcExitLib
diff --git a/UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiCpuExceptionHandlerLib.inf b/UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiCpuExceptionHandlerLib.inf
index 7c2ec3b2db..5339f8e604 100644
--- a/UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiCpuExceptionHandlerLib.inf
+++ b/UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiCpuExceptionHandlerLib.inf
@@ -52,7 +52,7 @@
HobLib
MemoryAllocationLib
SynchronizationLib
- VmgExitLib
+ CcExitLib
[Pcd]
gEfiMdeModulePkgTokenSpaceGuid.PcdCpuStackGuard # CONSUMES
diff --git a/UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiDxeSmmCpuException.c b/UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiDxeSmmCpuException.c
index a7d0897ef1..2b6d9da5c7 100644
--- a/UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiDxeSmmCpuException.c
+++ b/UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiDxeSmmCpuException.c
@@ -7,7 +7,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
**/
#include <Library/DebugLib.h>
-#include <Library/VmgExitLib.h>
+#include <Library/CcExitLib.h>
#include "CpuExceptionCommon.h"
/**
diff --git a/UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiCpuException.c b/UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiCpuException.c
index ad5e0e9ed4..0a9ea79f52 100644
--- a/UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiCpuException.c
+++ b/UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiCpuException.c
@@ -7,7 +7,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
**/
#include <PiPei.h>
-#include <Library/VmgExitLib.h>
+#include <Library/CcExitLib.h>
#include "CpuExceptionCommon.h"
CONST UINTN mDoFarReturnFlag = 0;
diff --git a/UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiCpuExceptionHandlerLib.inf b/UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiCpuExceptionHandlerLib.inf
index 6a170286c8..df44371fe0 100644
--- a/UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiCpuExceptionHandlerLib.inf
+++ b/UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiCpuExceptionHandlerLib.inf
@@ -48,7 +48,7 @@
PrintLib
LocalApicLib
PeCoffGetEntryPointLib
- VmgExitLib
+ CcExitLib
[Pcd]
gEfiMdeModulePkgTokenSpaceGuid.PcdCpuStackGuard
diff --git a/UefiCpuPkg/Library/CpuExceptionHandlerLib/SmmCpuExceptionHandlerLib.inf b/UefiCpuPkg/Library/CpuExceptionHandlerLib/SmmCpuExceptionHandlerLib.inf
index 9dde07612a..8f8a5dab79 100644
--- a/UefiCpuPkg/Library/CpuExceptionHandlerLib/SmmCpuExceptionHandlerLib.inf
+++ b/UefiCpuPkg/Library/CpuExceptionHandlerLib/SmmCpuExceptionHandlerLib.inf
@@ -51,7 +51,7 @@
LocalApicLib
PeCoffGetEntryPointLib
DebugLib
- VmgExitLib
+ CcExitLib
[Pcd]
gEfiMdeModulePkgTokenSpaceGuid.PcdCpuStackGuard
diff --git a/UefiCpuPkg/Library/CpuExceptionHandlerLib/Xcode5SecPeiCpuExceptionHandlerLib.inf b/UefiCpuPkg/Library/CpuExceptionHandlerLib/Xcode5SecPeiCpuExceptionHandlerLib.inf
index 6d2f66504a..619b39d7f1 100644
--- a/UefiCpuPkg/Library/CpuExceptionHandlerLib/Xcode5SecPeiCpuExceptionHandlerLib.inf
+++ b/UefiCpuPkg/Library/CpuExceptionHandlerLib/Xcode5SecPeiCpuExceptionHandlerLib.inf
@@ -53,7 +53,7 @@
PrintLib
LocalApicLib
PeCoffGetEntryPointLib
- VmgExitLib
+ CcExitLib
[Pcd]
gEfiMdeModulePkgTokenSpaceGuid.PcdCpuStackGuard
diff --git a/UefiCpuPkg/Library/MpInitLib/AmdSev.c b/UefiCpuPkg/Library/MpInitLib/AmdSev.c
index 4e4c63a52d..2dd8f4d746 100644
--- a/UefiCpuPkg/Library/MpInitLib/AmdSev.c
+++ b/UefiCpuPkg/Library/MpInitLib/AmdSev.c
@@ -8,7 +8,7 @@
**/
#include "MpLib.h"
-#include <Library/VmgExitLib.h>
+#include <Library/CcExitLib.h>
/**
Get Protected mode code segment with 16-bit default addressing
diff --git a/UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf b/UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf
index e1cd0b3500..cd07de3a3c 100644
--- a/UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf
+++ b/UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf
@@ -54,7 +54,7 @@
DebugAgentLib
SynchronizationLib
PcdLib
- VmgExitLib
+ CcExitLib
MicrocodeLib
[Protocols]
diff --git a/UefiCpuPkg/Library/MpInitLib/DxeMpLib.c b/UefiCpuPkg/Library/MpInitLib/DxeMpLib.c
index 78cc3e2b93..ef56af1f73 100644
--- a/UefiCpuPkg/Library/MpInitLib/DxeMpLib.c
+++ b/UefiCpuPkg/Library/MpInitLib/DxeMpLib.c
@@ -12,7 +12,7 @@
#include <Library/UefiBootServicesTableLib.h>
#include <Library/DebugAgentLib.h>
#include <Library/DxeServicesTableLib.h>
-#include <Library/VmgExitLib.h>
+#include <Library/CcExitLib.h>
#include <Register/Amd/Fam17Msr.h>
#include <Register/Amd/Ghcb.h>
diff --git a/UefiCpuPkg/Library/MpInitLib/MpLib.c b/UefiCpuPkg/Library/MpInitLib/MpLib.c
index 1c053f87a4..e5dc852ed9 100644
--- a/UefiCpuPkg/Library/MpInitLib/MpLib.c
+++ b/UefiCpuPkg/Library/MpInitLib/MpLib.c
@@ -9,7 +9,7 @@
**/
#include "MpLib.h"
-#include <Library/VmgExitLib.h>
+#include <Library/CcExitLib.h>
#include <Register/Amd/Fam17Msr.h>
#include <Register/Amd/Ghcb.h>
diff --git a/UefiCpuPkg/Library/MpInitLib/PeiMpInitLib.inf b/UefiCpuPkg/Library/MpInitLib/PeiMpInitLib.inf
index 5facf4db94..afd551bb0f 100644
--- a/UefiCpuPkg/Library/MpInitLib/PeiMpInitLib.inf
+++ b/UefiCpuPkg/Library/MpInitLib/PeiMpInitLib.inf
@@ -53,7 +53,7 @@
SynchronizationLib
PeiServicesLib
PcdLib
- VmgExitLib
+ CcExitLib
MicrocodeLib
[Pcd]
diff --git a/UefiCpuPkg/Library/MpInitLib/X64/AmdSev.c b/UefiCpuPkg/Library/MpInitLib/X64/AmdSev.c
index a3cd377ef6..4c4f81af7c 100644
--- a/UefiCpuPkg/Library/MpInitLib/X64/AmdSev.c
+++ b/UefiCpuPkg/Library/MpInitLib/X64/AmdSev.c
@@ -9,7 +9,7 @@
**/
#include "MpLib.h"
-#include <Library/VmgExitLib.h>
+#include <Library/CcExitLib.h>
#include <Register/Amd/Fam17Msr.h>
#include <Register/Amd/Ghcb.h>
diff --git a/UefiCpuPkg/Library/VmgExitLibNull/VmTdExitNull.c b/UefiCpuPkg/Library/VmgExitLibNull/VmTdExitNull.c
deleted file mode 100644
index 6a4e8087cb..0000000000
--- a/UefiCpuPkg/Library/VmgExitLibNull/VmTdExitNull.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/** @file
-
- Copyright (c) 2021, Intel Corporation. All rights reserved.<BR>
-
- SPDX-License-Identifier: BSD-2-Clause-Patent
-
-**/
-#include <Base.h>
-#include <Uefi.h>
-#include <Library/VmgExitLib.h>
-
-/**
- Handle a #VE exception.
-
- Performs the necessary processing to handle a #VE exception.
-
- @param[in, out] ExceptionType Pointer to an EFI_EXCEPTION_TYPE to be set
- as value to use on error.
- @param[in, out] SystemContext Pointer to EFI_SYSTEM_CONTEXT
-
- @retval EFI_SUCCESS Exception handled
- @retval EFI_UNSUPPORTED #VE not supported, (new) exception value to
- propagate provided
- @retval EFI_PROTOCOL_ERROR #VE handling failed, (new) exception value to
- propagate provided
-
-**/
-EFI_STATUS
-EFIAPI
-VmTdExitHandleVe (
- IN OUT EFI_EXCEPTION_TYPE *ExceptionType,
- IN OUT EFI_SYSTEM_CONTEXT SystemContext
- )
-{
- *ExceptionType = VE_EXCEPTION;
-
- return EFI_UNSUPPORTED;
-}
diff --git a/UefiCpuPkg/Library/VmgExitLibNull/VmgExitLibNull.uni b/UefiCpuPkg/Library/VmgExitLibNull/VmgExitLibNull.uni
deleted file mode 100644
index 8639bc0e8c..0000000000
--- a/UefiCpuPkg/Library/VmgExitLibNull/VmgExitLibNull.uni
+++ /dev/null
@@ -1,15 +0,0 @@
-// /** @file
-// VMGEXIT support library instance.
-//
-// VMGEXIT support library instance.
-//
-// Copyright (C) 2020, Advanced Micro Devices, Inc. All rights reserved.<BR>
-// SPDX-License-Identifier: BSD-2-Clause-Patent
-//
-// **/
-
-
-#string STR_MODULE_ABSTRACT #language en-US "VMGEXIT support NULL library instance"
-
-#string STR_MODULE_DESCRIPTION #language en-US "VMGEXIT support NULL library instance."
-
diff --git a/UefiCpuPkg/UefiCpuPkg.dec b/UefiCpuPkg/UefiCpuPkg.dec
index 718323d904..cff239d528 100644
--- a/UefiCpuPkg/UefiCpuPkg.dec
+++ b/UefiCpuPkg/UefiCpuPkg.dec
@@ -53,8 +53,8 @@
##
MpInitLib|Include/Library/MpInitLib.h
- ## @libraryclass Provides function to support VMGEXIT processing.
- VmgExitLib|Include/Library/VmgExitLib.h
+ ## @libraryclass Provides function to support CcExit processing.
+ CcExitLib|Include/Library/CcExitLib.h
## @libraryclass Provides function to get CPU cache information.
CpuCacheInfoLib|Include/Library/CpuCacheInfoLib.h
diff --git a/UefiCpuPkg/UefiCpuPkg.dsc b/UefiCpuPkg/UefiCpuPkg.dsc
index 0e1a99ddc0..67b0ce46e4 100644
--- a/UefiCpuPkg/UefiCpuPkg.dsc
+++ b/UefiCpuPkg/UefiCpuPkg.dsc
@@ -59,7 +59,7 @@
PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
PeCoffExtraActionLib|MdePkg/Library/BasePeCoffExtraActionLibNull/BasePeCoffExtraActionLibNull.inf
TpmMeasurementLib|MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasurementLibNull.inf
- VmgExitLib|UefiCpuPkg/Library/VmgExitLibNull/VmgExitLibNull.inf
+ CcExitLib|UefiCpuPkg/Library/CcExitLibNull/CcExitLibNull.inf
MicrocodeLib|UefiCpuPkg/Library/MicrocodeLib/MicrocodeLib.inf
SmmCpuRendezvousLib|UefiCpuPkg/Library/SmmCpuRendezvousLib/SmmCpuRendezvousLib.inf
CpuPageTableLib|UefiCpuPkg/Library/CpuPageTableLib/CpuPageTableLib.inf
@@ -163,7 +163,7 @@
UefiCpuPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.inf
UefiCpuPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLibStm.inf
UefiCpuPkg/Library/SmmCpuFeaturesLib/StandaloneMmCpuFeaturesLib.inf
- UefiCpuPkg/Library/VmgExitLibNull/VmgExitLibNull.inf
+ UefiCpuPkg/Library/CcExitLibNull/CcExitLibNull.inf
UefiCpuPkg/PiSmmCommunication/PiSmmCommunicationPei.inf
UefiCpuPkg/PiSmmCommunication/PiSmmCommunicationSmm.inf
UefiCpuPkg/SecCore/SecCore.inf
diff --git a/UefiPayloadPkg/UefiPayloadPkg.dsc b/UefiPayloadPkg/UefiPayloadPkg.dsc
index 1150be6acd..723a50a422 100644
--- a/UefiPayloadPkg/UefiPayloadPkg.dsc
+++ b/UefiPayloadPkg/UefiPayloadPkg.dsc
@@ -301,7 +301,7 @@
VariablePolicyLib|MdeModulePkg/Library/VariablePolicyLib/VariablePolicyLib.inf
VariablePolicyHelperLib|MdeModulePkg/Library/VariablePolicyHelperLib/VariablePolicyHelperLib.inf
VariableFlashInfoLib|MdeModulePkg/Library/BaseVariableFlashInfoLib/BaseVariableFlashInfoLib.inf
- VmgExitLib|UefiCpuPkg/Library/VmgExitLibNull/VmgExitLibNull.inf
+ CcExitLib|UefiCpuPkg/Library/CcExitLibNull/CcExitLibNull.inf
ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf
[LibraryClasses.common]