diff options
author | Min M Xu <min.m.xu@intel.com> | 2022-11-07 14:30:26 +0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2022-11-14 04:55:34 +0000 |
commit | a89f558d3c56d9c16e5f5b7d395c1aa36ccd38f2 (patch) | |
tree | f4f1e353a1ce5913cf9b0b3963f0d10d5e6a35c8 /OvmfPkg/Library | |
parent | b9e702c3c9bfe7bfb6bbcff44603add64e1787bf (diff) | |
download | edk2-a89f558d3c56d9c16e5f5b7d395c1aa36ccd38f2.tar.gz edk2-a89f558d3c56d9c16e5f5b7d395c1aa36ccd38f2.tar.bz2 edk2-a89f558d3c56d9c16e5f5b7d395c1aa36ccd38f2.zip |
OvmfPkg/UefiCpuPkg/UefiPayloadPkg: Rename VmgExitLib to CcExitLib
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4123
VmgExitLib once was designed to provide interfaces to support #VC handler
and issue VMGEXIT instruction. After TDVF (enable TDX feature in OVMF) is
introduced, this library is updated to support #VE as well. Now the name
of VmgExitLib cannot reflect what the lib does.
This patch renames VmgExitLib to CcExitLib (Cc means Confidential
Computing). This is a simple renaming and there is no logic changes.
After renaming all the VmgExitLib related codes are updated with
CcExitLib. These changes are in OvmfPkg/UefiCpuPkg/UefiPayloadPkg.
Cc: Guo Dong <guo.dong@intel.com>
Cc: Sean Rhodes <sean@starlabs.systems>
Cc: James Lu <james.lu@intel.com>
Cc: Gua Guo <gua.guo@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Brijesh Singh <brijesh.singh@amd.com>
Cc: Erdem Aktas <erdemaktas@google.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: James Bottomley <jejb@linux.ibm.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Tom Lendacky <thomas.lendacky@amd.com>
Reviewed-by: James Lu <james.lu@intel.com>
Reviewed-by: Gua Guo <gua.guo@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
Signed-off-by: Min Xu <min.m.xu@intel.com>
Diffstat (limited to 'OvmfPkg/Library')
-rw-r--r-- | OvmfPkg/Library/BaseMemEncryptSevLib/DxeMemEncryptSevLib.inf | 2 | ||||
-rw-r--r-- | OvmfPkg/Library/BaseMemEncryptSevLib/PeiMemEncryptSevLib.inf | 2 | ||||
-rw-r--r-- | OvmfPkg/Library/BaseMemEncryptSevLib/SecMemEncryptSevLib.inf | 2 | ||||
-rw-r--r-- | OvmfPkg/Library/BaseMemEncryptSevLib/X64/SnpPageStateChangeInternal.c | 2 | ||||
-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 |
14 files changed, 36 insertions, 35 deletions
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 |