audk/MdePkg/Library/BaseLib/Ia32
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
..
ARShiftU64.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
ARShiftU64.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
CpuBreakpoint.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
CpuBreakpoint.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
CpuId.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
CpuId.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
CpuIdEx.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
CpuIdEx.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
CpuPause.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
CpuPause.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
DisableCache.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
DisableCache.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
DisableInterrupts.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
DisableInterrupts.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
DisablePaging32.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
DisablePaging32.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
DivS64x64Remainder.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
DivU64x32.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
DivU64x32.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
DivU64x32Remainder.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
DivU64x32Remainder.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
DivU64x64Remainder.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
EnableCache.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
EnableCache.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
EnableDisableInterrupts.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
EnableDisableInterrupts.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
EnableInterrupts.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
EnableInterrupts.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
EnablePaging32.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
EnablePaging32.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
EnablePaging64.nasm MdePkg: Replace Opcode with the corresponding instructions. 2022-03-01 01:45:47 +00:00
FlushCacheLine.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
FlushCacheLine.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
FxRestore.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
FxRestore.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
FxSave.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
FxSave.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
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
InternalSwitchStack.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
InternalSwitchStack.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
Invd.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
Invd.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
LRotU64.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
LRotU64.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
LShiftU64.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
LShiftU64.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
Lfence.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
LongJump.nasm MdePkg: Replace Opcode with the corresponding instructions. 2022-03-01 01:45:47 +00:00
ModU64x32.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
ModU64x32.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
Monitor.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
Monitor.nasm MdePkg: Replace Opcode with the corresponding instructions. 2022-03-01 01:45:47 +00:00
MultU64x32.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
MultU64x32.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
MultU64x64.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
MultU64x64.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
Mwait.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +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
RRotU64.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
RRotU64.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
RShiftU64.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
RShiftU64.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
RdRand.nasm MdePkg: Replace Opcode with the corresponding instructions. 2022-03-01 01:45:47 +00:00
ReadCr0.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
ReadCr0.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
ReadCr2.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
ReadCr2.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
ReadCr3.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
ReadCr3.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
ReadCr4.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
ReadCr4.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
ReadCs.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
ReadCs.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
ReadDr0.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
ReadDr0.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
ReadDr1.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
ReadDr1.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
ReadDr2.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
ReadDr2.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
ReadDr3.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
ReadDr3.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
ReadDr4.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
ReadDr4.nasm MdePkg: Replace Opcode with the corresponding instructions. 2022-03-01 01:45:47 +00:00
ReadDr5.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
ReadDr5.nasm MdePkg: Replace Opcode with the corresponding instructions. 2022-03-01 01:45:47 +00:00
ReadDr6.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
ReadDr6.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
ReadDr7.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
ReadDr7.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
ReadDs.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
ReadDs.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
ReadEflags.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
ReadEflags.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
ReadEs.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
ReadEs.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
ReadFs.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
ReadFs.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
ReadGdtr.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
ReadGdtr.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
ReadGs.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
ReadGs.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
ReadIdtr.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
ReadIdtr.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
ReadLdtr.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
ReadLdtr.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
ReadMm0.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
ReadMm0.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
ReadMm1.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
ReadMm1.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
ReadMm2.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
ReadMm2.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
ReadMm3.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
ReadMm3.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
ReadMm4.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
ReadMm4.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
ReadMm5.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
ReadMm5.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
ReadMm6.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
ReadMm6.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
ReadMm7.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
ReadMm7.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
ReadMsr64.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
ReadMsr64.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
ReadPmc.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
ReadPmc.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
ReadSs.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
ReadSs.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
ReadTr.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
ReadTr.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
ReadTsc.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
ReadTsc.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
SetJump.nasm MdePkg: Replace Opcode with the corresponding instructions. 2022-03-01 01:45:47 +00:00
SwapBytes64.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
SwapBytes64.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
Thunk16.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
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.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
Wbinvd.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
WriteCr0.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
WriteCr0.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
WriteCr2.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
WriteCr2.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
WriteCr3.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
WriteCr3.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
WriteCr4.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
WriteCr4.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
WriteDr0.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
WriteDr0.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
WriteDr1.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
WriteDr1.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
WriteDr2.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
WriteDr2.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
WriteDr3.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
WriteDr3.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
WriteDr4.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
WriteDr4.nasm MdePkg: Replace Opcode with the corresponding instructions. 2022-03-01 01:45:47 +00:00
WriteDr5.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
WriteDr5.nasm MdePkg: Replace Opcode with the corresponding instructions. 2022-03-01 01:45:47 +00:00
WriteDr6.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
WriteDr6.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
WriteDr7.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
WriteDr7.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
WriteGdtr.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
WriteGdtr.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
WriteIdtr.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
WriteIdtr.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
WriteLdtr.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
WriteLdtr.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
WriteMm0.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
WriteMm0.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
WriteMm1.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
WriteMm1.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
WriteMm2.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
WriteMm2.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
WriteMm3.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
WriteMm3.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
WriteMm4.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
WriteMm4.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
WriteMm5.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
WriteMm5.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
WriteMm6.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
WriteMm6.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
WriteMm7.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
WriteMm7.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
WriteMsr64.c MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
WriteMsr64.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
WriteTr.nasm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
XGetBv.nasm MdePkg/BaseLib: Add support for the XGETBV instruction 2020-08-16 16:45:42 +00:00
XSetBv.nasm MdePkg/BaseLib: Add support for the XSETBV instruction 2021-04-06 00:43:49 +00:00