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>
This commit is contained in:
53
OvmfPkg/Library/CcExitLib/CcExitVcHandler.h
Normal file
53
OvmfPkg/Library/CcExitLib/CcExitVcHandler.h
Normal file
@@ -0,0 +1,53 @@
|
||||
/** @file
|
||||
X64 #VC Exception Handler functon header file.
|
||||
|
||||
Copyright (C) 2020, Advanced Micro Devices, Inc. All rights reserved.<BR>
|
||||
SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
|
||||
**/
|
||||
|
||||
#ifndef CC_EXIT_VC_HANDLER_H_
|
||||
#define CC_EXIT_VC_HANDLER_H_
|
||||
|
||||
#include <Base.h>
|
||||
#include <Uefi.h>
|
||||
#include <Library/CcExitLib.h>
|
||||
|
||||
/**
|
||||
Handle a #VC exception.
|
||||
|
||||
Performs the necessary processing to handle a #VC exception.
|
||||
|
||||
@param[in, out] Ghcb Pointer to the GHCB
|
||||
@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 #VC not supported, (new) exception value to
|
||||
propagate provided
|
||||
@retval EFI_PROTOCOL_ERROR #VC handling failed, (new) exception value to
|
||||
propagate provided
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
InternalVmgExitHandleVc (
|
||||
IN OUT GHCB *Ghcb,
|
||||
IN OUT EFI_EXCEPTION_TYPE *ExceptionType,
|
||||
IN OUT EFI_SYSTEM_CONTEXT SystemContext
|
||||
);
|
||||
|
||||
/**
|
||||
Routine to allow ASSERT from within #VC.
|
||||
|
||||
@param[in, out] SevEsData Pointer to the per-CPU data
|
||||
|
||||
**/
|
||||
VOID
|
||||
EFIAPI
|
||||
VmgExitIssueAssert (
|
||||
IN OUT SEV_ES_PER_CPU_DATA *SevEsData
|
||||
);
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user