]> git.proxmox.com Git - mirror_edk2.git/blob - OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.h
OvmfPkg/VmgExitLib: Support nested #VCs
[mirror_edk2.git] / OvmfPkg / Library / VmgExitLib / VmgExitVcHandler.h
1 /** @file
2 X64 #VC Exception Handler functon header file.
3
4 Copyright (C) 2020, Advanced Micro Devices, Inc. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
6
7 **/
8
9 #ifndef __VMG_EXIT_VC_HANDLER_H__
10 #define __VMG_EXIT_VC_HANDLER_H__
11
12 #include <Base.h>
13 #include <Uefi.h>
14 #include <Library/VmgExitLib.h>
15
16 /**
17 Handle a #VC exception.
18
19 Performs the necessary processing to handle a #VC exception.
20
21 @param[in, out] Ghcb Pointer to the GHCB
22 @param[in, out] ExceptionType Pointer to an EFI_EXCEPTION_TYPE to be set
23 as value to use on error.
24 @param[in, out] SystemContext Pointer to EFI_SYSTEM_CONTEXT
25
26 @retval EFI_SUCCESS Exception handled
27 @retval EFI_UNSUPPORTED #VC not supported, (new) exception value to
28 propagate provided
29 @retval EFI_PROTOCOL_ERROR #VC handling failed, (new) exception value to
30 propagate provided
31
32 **/
33 EFI_STATUS
34 EFIAPI
35 InternalVmgExitHandleVc (
36 IN OUT GHCB *Ghcb,
37 IN OUT EFI_EXCEPTION_TYPE *ExceptionType,
38 IN OUT EFI_SYSTEM_CONTEXT SystemContext
39 );
40
41 /**
42 Routine to allow ASSERT from within #VC.
43
44 @param[in, out] SevEsData Pointer to the per-CPU data
45
46 **/
47 VOID
48 EFIAPI
49 VmgExitIssueAssert (
50 IN OUT SEV_ES_PER_CPU_DATA *SevEsData
51 );
52
53 #endif