audk/MdePkg/Library/BaseLib/X64
Tom Lendacky c0bf953fe8 MdePkg/BaseLib: Add a new VMGEXIT instruction invocation for SVSM
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4654

The SVSM specification relies on a specific register calling convention to
hold the parameters that are associated with the SVSM request. The SVSM is
invoked by requesting the hypervisor to run the VMPL0 VMSA of the guest
using the GHCB MSR Protocol or a GHCB NAE event.

Create a new version of the VMGEXIT instruction that will adhere to this
calling convention and load the SVSM function arguments into the proper
register before invoking the VMGEXIT instruction. On return, perform the
atomic exchange on the SVSM call pending value as specified in the SVSM
specification.

Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
2024-04-17 18:30:03 +00:00
..
CpuBreakpoint.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
CpuBreakpoint.nasm
CpuId.nasm
CpuIdEx.nasm
CpuPause.nasm
DisableCache.nasm
DisableInterrupts.nasm
DisablePaging64.nasm MdePkg: Replace Opcode with the corresponding instructions. 2022-03-01 01:45:47 +00:00
EnableCache.nasm
EnableDisableInterrupts.nasm
EnableInterrupts.nasm
FlushCacheLine.nasm
FxRestore.nasm
FxSave.nasm
GccInline.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
GccInlinePriv.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
Invd.nasm
Lfence.nasm
LongJump.nasm MdePkg: Replace Opcode with the corresponding instructions. 2022-03-01 01:45:47 +00:00
Monitor.nasm MdePkg: Replace Opcode with the corresponding instructions. 2022-03-01 01:45:47 +00:00
Mwait.nasm MdePkg: Replace Opcode with the corresponding instructions. 2022-03-01 01:45:47 +00:00
Non-existing.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
Pvalidate.nasm MdePkg/BaseLib: add support for PVALIDATE instruction 2021-05-29 12:15:21 +00:00
RdRand.nasm MdePkg: Replace Opcode with the corresponding instructions. 2022-03-01 01:45:47 +00:00
ReadCr0.nasm
ReadCr2.nasm
ReadCr3.nasm
ReadCr4.nasm
ReadCs.nasm
ReadDr0.nasm
ReadDr1.nasm
ReadDr2.nasm
ReadDr3.nasm
ReadDr4.nasm MdePkg: Replace Opcode with the corresponding instructions. 2022-03-01 01:45:47 +00:00
ReadDr5.nasm MdePkg: Replace Opcode with the corresponding instructions. 2022-03-01 01:45:47 +00:00
ReadDr6.nasm
ReadDr7.nasm
ReadDs.nasm
ReadEflags.nasm
ReadEs.nasm
ReadFs.nasm
ReadGdtr.nasm
ReadGs.nasm
ReadIdtr.nasm
ReadLdtr.nasm
ReadMm0.nasm MdePkg: Replace Opcode with the corresponding instructions. 2022-03-01 01:45:47 +00:00
ReadMm1.nasm MdePkg: Replace Opcode with the corresponding instructions. 2022-03-01 01:45:47 +00:00
ReadMm2.nasm MdePkg: Replace Opcode with the corresponding instructions. 2022-03-01 01:45:47 +00:00
ReadMm3.nasm MdePkg: Replace Opcode with the corresponding instructions. 2022-03-01 01:45:47 +00:00
ReadMm4.nasm MdePkg: Replace Opcode with the corresponding instructions. 2022-03-01 01:45:47 +00:00
ReadMm5.nasm MdePkg: Replace Opcode with the corresponding instructions. 2022-03-01 01:45:47 +00:00
ReadMm6.nasm MdePkg: Replace Opcode with the corresponding instructions. 2022-03-01 01:45:47 +00:00
ReadMm7.nasm MdePkg: Replace Opcode with the corresponding instructions. 2022-03-01 01:45:47 +00:00
ReadMsr64.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
ReadMsr64.nasm
ReadPmc.nasm
ReadSs.nasm
ReadTr.nasm
ReadTsc.nasm
RmpAdjust.nasm MdePkg/BaseLib: add support for RMPADJUST instruction 2021-05-29 12:15:21 +00:00
SetJump.nasm MdePkg: Replace Opcode with the corresponding instructions. 2022-03-01 01:45:47 +00:00
SwitchStack.nasm
TdCall.nasm MdePkg: Introduce basic Tdx functions in BaseLib 2022-04-02 08:15:12 +00:00
TdProbe.c MdePkg: Introduce basic Tdx functions in BaseLib 2022-04-02 08:15:12 +00:00
TdVmcall.nasm MdePkg/BaseLib: Update TDVMCALL_EXPOSE_REGS_MASK 2024-03-19 09:42:06 +00:00
Thunk16.nasm
VmgExit.nasm MdePkg/BaseLib: Add support for the VMGEXIT instruction 2020-08-16 16:45:42 +00:00
VmgExitSvsm.nasm MdePkg/BaseLib: Add a new VMGEXIT instruction invocation for SVSM 2024-04-17 18:30:03 +00:00
Wbinvd.nasm
WriteCr0.nasm
WriteCr2.nasm
WriteCr3.nasm
WriteCr4.nasm
WriteDr0.nasm
WriteDr1.nasm
WriteDr2.nasm
WriteDr3.nasm
WriteDr4.nasm MdePkg: Replace Opcode with the corresponding instructions. 2022-03-01 01:45:47 +00:00
WriteDr5.nasm MdePkg: Replace Opcode with the corresponding instructions. 2022-03-01 01:45:47 +00:00
WriteDr6.nasm
WriteDr7.nasm
WriteGdtr.nasm
WriteIdtr.nasm
WriteLdtr.nasm
WriteMm0.nasm MdePkg: Replace Opcode with the corresponding instructions. 2022-03-01 01:45:47 +00:00
WriteMm1.nasm MdePkg: Replace Opcode with the corresponding instructions. 2022-03-01 01:45:47 +00:00
WriteMm2.nasm MdePkg: Replace Opcode with the corresponding instructions. 2022-03-01 01:45:47 +00:00
WriteMm3.nasm MdePkg: Replace Opcode with the corresponding instructions. 2022-03-01 01:45:47 +00:00
WriteMm4.nasm MdePkg: Replace Opcode with the corresponding instructions. 2022-03-01 01:45:47 +00:00
WriteMm5.nasm MdePkg: Replace Opcode with the corresponding instructions. 2022-03-01 01:45:47 +00:00
WriteMm6.nasm MdePkg: Replace Opcode with the corresponding instructions. 2022-03-01 01:45:47 +00:00
WriteMm7.nasm MdePkg: Replace Opcode with the corresponding instructions. 2022-03-01 01:45:47 +00:00
WriteMsr64.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
WriteMsr64.nasm
WriteTr.nasm
XGetBv.nasm
XSetBv.nasm MdePkg/BaseLib: Add support for the XSETBV instruction 2021-04-06 00:43:49 +00:00