audk/MdePkg/Library/BaseLib
Tom Lendacky f8422f1e0b MdePkg/BaseLib: Add support for the VMGEXIT instruction
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198

VMGEXIT is a new instruction used for Hypervisor/Guest communication when
running as an SEV-ES guest. A VMGEXIT will cause an automatic exit (AE)
to occur, resulting in a #VMEXIT with an exit code value of 0x403.

Since SEV-ES is only supported in X64, provide the necessary X64 support
to execute the VMGEXIT instruction, which is coded as "rep vmmcall". For
IA32, since "vmmcall" is not supported in NASM 32-bit mode and VMGEXIT
should never be called, provide a stub implementation that is identical
to CpuBreakpoint().

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Regression-tested-by: Laszlo Ersek <lersek@redhat.com>
2020-08-16 16:45:42 +00:00
..
AArch64 MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
Arm MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
Ebc MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
Ia32 MdePkg/BaseLib: Add support for the VMGEXIT instruction 2020-08-16 16:45:42 +00:00
RiscV64 BaseLib:Fix RISC-V Supervisor mode (S-Mode) trap handler reentry issue. 2020-08-12 04:01:39 +00:00
X64 MdePkg/BaseLib: Add support for the VMGEXIT instruction 2020-08-16 16:45:42 +00:00
ARShiftU64.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
BaseLib.inf MdePkg/BaseLib: Add support for the VMGEXIT instruction 2020-08-16 16:45:42 +00:00
BaseLib.uni MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
BaseLibInternals.h MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
BitField.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
CheckSum.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
ChkStkGcc.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
Cpu.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
CpuDeadLoop.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
DivS64x64Remainder.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
DivU64x32.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
DivU64x32Remainder.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
DivU64x64Remainder.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
FilePaths.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
GetPowerOfTwo32.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
GetPowerOfTwo64.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
HighBitSet32.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
HighBitSet64.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
LRotU32.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
LRotU64.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
LShiftU64.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
LinkedList.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
LongJump.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
LowBitSet32.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
LowBitSet64.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
Math64.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
ModU64x32.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
MultS64x64.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
MultU64x32.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
MultU64x64.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
RRotU32.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
RRotU64.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
RShiftU64.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
SafeString.c MdePkg: Fix SafeString performing assertions on runtime checks 2020-05-22 00:03:14 +00:00
SetJump.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
String.c MdePkg/BaseLib: Base64Decode(): don't declare variables in nested blocks 2019-07-17 16:36:57 +02:00
SwapBytes16.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
SwapBytes32.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
SwapBytes64.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
SwitchStack.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
Unaligned.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
UnitTestHost.c MdePkg/Library/BaseLib: Add BaseLib instance for host based unit tests 2020-07-15 05:25:21 +00:00
UnitTestHost.h MdePkg/Library/BaseLib: Add BaseLib instance for host based unit tests 2020-07-15 05:25:21 +00:00
UnitTestHostBaseLib.inf MdePkg/Library/UnitTestHostBaseLib: Add missing services 2020-07-28 19:03:09 +00:00
UnitTestHostBaseLib.uni MdePkg/Library/BaseLib: Add BaseLib instance for host based unit tests 2020-07-15 05:25:21 +00:00
X86DisablePaging32.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
X86DisablePaging64.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
X86EnablePaging32.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
X86EnablePaging64.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
X86FxRestore.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
X86FxSave.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
X86GetInterruptState.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
X86MemoryFence.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
X86Msr.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
X86PatchInstruction.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
X86RdRand.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
X86ReadGdtr.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
X86ReadIdtr.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
X86SpeculationBarrier.c MdePkg/BaseLib: Use PcdSpeculationBarrierType 2019-04-30 16:39:15 -07:00
X86Thunk.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
X86UnitTestHost.c MdePkg/Library/BaseLib: Add BaseLib instance for host based unit tests 2020-07-15 05:25:21 +00:00
X86WriteGdtr.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
X86WriteIdtr.c MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00