TianoCore EDK2 master
|
#include <Library/BaseLib.h>
#include <Library/DebugLib.h>
#include "VmTdExitHandler.h"
#include <Library/VmgExitLib.h>
#include <Library/BaseMemoryLib.h>
#include <IndustryStandard/Tdx.h>
#include <IndustryStandard/InstructionParsing.h>
Go to the source code of this file.
Data Structures | |
union | MSR_DATA |
union | REX |
union | MODRM |
struct | CPUID_DATA |
Macros | |
#define | TDX_DECODER_BUG_ON(x) |
Functions | |
STATIC UINT64 EFIAPI | CpuIdExit (IN EFI_SYSTEM_CONTEXT_X64 *Regs, IN TDCALL_VEINFO_RETURN_DATA *Veinfo) |
STATIC UINT64 EFIAPI | IoExit (IN OUT EFI_SYSTEM_CONTEXT_X64 *Regs, IN TDCALL_VEINFO_RETURN_DATA *Veinfo) |
STATIC UINT64 | ReadMsrExit (IN OUT EFI_SYSTEM_CONTEXT_X64 *Regs, IN TDCALL_VEINFO_RETURN_DATA *Veinfo) |
STATIC UINT64 | WriteMsrExit (IN OUT EFI_SYSTEM_CONTEXT_X64 *Regs, IN TDCALL_VEINFO_RETURN_DATA *Veinfo) |
STATIC VOID EFIAPI | TdxDecodeInstruction (IN UINT8 *Rip) |
STATIC UINT64 *EFIAPI | GetRegFromContext (IN EFI_SYSTEM_CONTEXT_X64 *Regs, IN UINTN RegIndex) |
STATIC INTN EFIAPI | MmioExit (IN OUT EFI_SYSTEM_CONTEXT_X64 *Regs, IN TDCALL_VEINFO_RETURN_DATA *Veinfo) |
EFI_STATUS EFIAPI | VmTdExitHandleVe (IN OUT EFI_EXCEPTION_TYPE *ExceptionType, IN OUT EFI_SYSTEM_CONTEXT SystemContext) |
Copyright (c) 2021, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file VmTdExitVeHandler.c.
#define TDX_DECODER_BUG_ON | ( | x | ) |
Definition at line 232 of file VmTdExitVeHandler.c.
STATIC UINT64 EFIAPI CpuIdExit | ( | IN EFI_SYSTEM_CONTEXT_X64 * | Regs, |
IN TDCALL_VEINFO_RETURN_DATA * | Veinfo | ||
) |
Handle an CPUID event.
Use the TDVMCALL instruction to handle cpuid #ve
[in,out] | Regs | x64 processor context |
[in] | Veinfo | VE Info |
0 | Event handled successfully |
Definition at line 62 of file VmTdExitVeHandler.c.
Definition at line 241 of file VmTdExitVeHandler.c.
STATIC UINT64 EFIAPI IoExit | ( | IN OUT EFI_SYSTEM_CONTEXT_X64 * | Regs, |
IN TDCALL_VEINFO_RETURN_DATA * | Veinfo | ||
) |
Handle an IO event.
Use the TDVMCALL instruction to handle either an IO read or an IO write.
[in,out] | Regs | x64 processor context |
[in] | Veinfo | VE Info |
0 | Event handled successfully |
Definition at line 96 of file VmTdExitVeHandler.c.
STATIC INTN EFIAPI MmioExit | ( | IN OUT EFI_SYSTEM_CONTEXT_X64 * | Regs, |
IN TDCALL_VEINFO_RETURN_DATA * | Veinfo | ||
) |
Handle an MMIO event.
Use the TDVMCALL instruction to handle either an mmio read or an mmio write.
[in,out] | Regs | x64 processor context |
[in] | Veinfo | VE Info |
0 | Event handled successfully |
Definition at line 298 of file VmTdExitVeHandler.c.
STATIC UINT64 ReadMsrExit | ( | IN OUT EFI_SYSTEM_CONTEXT_X64 * | Regs, |
IN TDCALL_VEINFO_RETURN_DATA * | Veinfo | ||
) |
Handle an READ MSR event.
Use the TDVMCALL instruction to handle msr read
[in,out] | Regs | x64 processor context |
[in] | Veinfo | VE Info |
0 | Event handled successfully |
Definition at line 169 of file VmTdExitVeHandler.c.
Definition at line 218 of file VmTdExitVeHandler.c.
EFI_STATUS EFIAPI VmTdExitHandleVe | ( | IN OUT EFI_EXCEPTION_TYPE * | ExceptionType, |
IN OUT EFI_SYSTEM_CONTEXT | SystemContext | ||
) |
Handle a #VE exception.
Performs the necessary processing to handle a #VE exception.
[in,out] | ExceptionType | Pointer to an EFI_EXCEPTION_TYPE to be set as value to use on error. |
[in,out] | SystemContext | Pointer to EFI_SYSTEM_CONTEXT |
EFI_SUCCESS | Exception handled |
EFI_UNSUPPORTED | #VE not supported, (new) exception value to propagate provided |
EFI_PROTOCOL_ERROR | #VE handling failed, (new) exception value to propagate provided |
Definition at line 449 of file VmTdExitVeHandler.c.
STATIC UINT64 WriteMsrExit | ( | IN OUT EFI_SYSTEM_CONTEXT_X64 * | Regs, |
IN TDCALL_VEINFO_RETURN_DATA * | Veinfo | ||
) |
Handle an WRITE MSR event.
Use the TDVMCALL instruction to handle msr write
[in,out] | Regs | x64 processor context |
[in] | Veinfo | VE Info |
0 | Event handled successfully |
Definition at line 199 of file VmTdExitVeHandler.c.