audk/MdePkg/Library
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
..
BaseCacheMaintenanceLib MdePkg/BaseCacheMaintenanceLib: 2020-05-07 03:17:15 +00:00
BaseCacheMaintenanceLibNull MdePkg/BaseCacheMaintenanceLibNull: Add Null instance for host testing 2020-07-15 05:25:21 +00:00
BaseCpuLib MdePkg/BaseCpuLib: RISC-V Base CPU library 2020-05-07 03:17:15 +00:00
BaseCpuLibNull MdePkg/BaseCpuLibNull: Add Null version of CpuLib for host testing 2020-07-15 05:25:21 +00:00
BaseDebugLibNull MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
BaseDebugLibSerialPort MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
BaseDebugPrintErrorLevelLib MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
BaseExtractGuidedSectionLib MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
BaseIoLibIntrinsic MdePkg/BaseIoLibIntrinsic: Rename IoLibArm.c=>IoLibNoIo.c 2020-05-07 03:17:15 +00:00
BaseLib MdePkg/BaseLib: Add support for the VMGEXIT instruction 2020-08-16 16:45:42 +00:00
BaseMemoryLib MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
BaseMemoryLibMmx MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
BaseMemoryLibOptDxe MdePkg/BaseMemoryLibOptDxe: Apply BSD-2-Clause-Patent 2020-08-06 20:20:40 +00:00
BaseMemoryLibOptPei MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
BaseMemoryLibRepStr MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
BaseMemoryLibSse2 MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
BaseOrderedCollectionRedBlackTreeLib MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
BasePcdLibNull MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
BasePciCf8Lib MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
BasePciExpressLib MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
BasePciLibCf8 MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
BasePciLibPciExpress MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
BasePciSegmentInfoLibNull MdePkg/PciSegmentInfoLib: Add missing EFIAPI to GetPciSegmentInfo() 2020-06-24 05:46:27 +00:00
BasePciSegmentLibPci MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
BasePeCoffExtraActionLibNull MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
BasePeCoffGetEntryPointLib MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
BasePeCoffLib MdePkg/BasePeCoff: Add RISC-V PE/Coff related code. 2020-05-07 03:17:15 +00:00
BasePerformanceLibNull MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
BasePostCodeLibDebug MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
BasePostCodeLibPort80 MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
BasePrintLib MdePkg/BasePrintLib: avoid absolute addresses for error strings 2020-06-16 09:14:17 +00:00
BaseReportStatusCodeLibNull MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
BaseRngLib MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
BaseRngLibNull MdePkg: add null version of RngLib 2019-11-14 01:32:15 +00:00
BaseS3BootScriptLibNull MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
BaseS3IoLib MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
BaseS3PciLib MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
BaseS3PciSegmentLib MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
BaseS3SmbusLib MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
BaseS3StallLib MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
BaseSafeIntLib MdePkg/BaseSafeIntLib: Add RISCV64 arch for BaseSafeIntLib. 2020-05-07 03:17:15 +00:00
BaseSerialPortLibNull MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
BaseSmbusLibNull MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
BaseStackCheckLib MdePkg/Library/BaseStackCheckLib: Fix PCD type in INF 2020-07-15 05:25:21 +00:00
BaseSynchronizationLib MdePkg/BaseSynchronizationLib: RISC-V cache related code. 2020-05-07 03:17:15 +00:00
BaseTimerLibNullTemplate MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
BaseUefiDecompressLib MdePkg/BaseUefiDecompressLib: Add missing description for parameter 2019-08-13 17:16:14 +08:00
DxeCoreEntryPoint MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
DxeCoreHobLib MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
DxeExtractGuidedSectionLib MdePkg/Library/Dxe: Fix various typos 2020-02-10 22:30:07 +00:00
DxeHobLib MdePkg/Library/Dxe: Fix various typos 2020-02-10 22:30:07 +00:00
DxeHstiLib MdePkg/DxeHstiLib: Added checks to improve error handling. 2019-09-02 12:17:56 +08:00
DxeIoLibCpuIo2 MdePkg/Library/Dxe: Fix various typos 2020-02-10 22:30:07 +00:00
DxePcdLib MdePkg/Library/Dxe: Fix various typos 2020-02-10 22:30:07 +00:00
DxeRuntimeDebugLibSerialPort MdePkg: Do not use CreateEventEx unless required 2020-01-10 03:25:59 +00:00
DxeRuntimePciExpressLib MdePkg/Library/Dxe: Fix various typos 2020-02-10 22:30:07 +00:00
DxeServicesLib MdePkg/DxeServicesLib: Add RISC-V architecture 2020-04-03 17:09:12 +00:00
DxeServicesTableLib MdePkg/Library/Dxe: Fix various typos 2020-02-10 22:30:07 +00:00
DxeSmbusLib MdePkg/Library/Dxe: Fix various typos 2020-02-10 22:30:07 +00:00
MmServicesTableLib MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
PciSegmentLibSegmentInfo MdePkg/Library/Pci: Fix various typos 2020-02-10 22:30:07 +00:00
PeiCoreEntryPoint MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
PeiDxePostCodeLibReportStatusCode MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
PeiExtractGuidedSectionLib MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
PeiHobLib MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
PeiIoLibCpuIo MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
PeiMemoryAllocationLib MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
PeiMemoryLib MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
PeiPcdLib MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
PeiPciLibPciCfg2 MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
PeiPciSegmentLibPciCfg2 MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
PeiResourcePublicationLib MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
PeiServicesLib MdePkg/PeiServicesLib.c: Change comments of PeiServicesResetSystem2 2019-04-28 09:40:12 +08:00
PeiServicesTablePointerLib MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
PeiServicesTablePointerLibIdt MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
PeiSmbusLibSmbus2Ppi MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
PeimEntryPoint MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
SecPeiDxeTimerLibCpu MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
SmiHandlerProfileLibNull MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
SmmIoLib MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
SmmIoLibSmmCpuIo2 MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
SmmLibNull MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
SmmMemLib MdePkg/Library/Smm: Fix various typos 2020-02-10 22:30:07 +00:00
SmmMemoryAllocationLib MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
SmmPciExpressLib MdePkg/Library/Smm: Fix various typos 2020-02-10 22:30:07 +00:00
SmmPciLibPciRootBridgeIo MdePkg/Library/Smm: Fix various typos 2020-02-10 22:30:07 +00:00
SmmPeriodicSmiLib MdePkg/Library/Smm: Fix various typos 2020-02-10 22:30:07 +00:00
SmmServicesTableLib MdePkg/Library/Smm: Fix various typos 2020-02-10 22:30:07 +00:00
StandaloneMmDriverEntryPoint MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
StandaloneMmServicesTableLib MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
UefiApplicationEntryPoint MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
UefiBootServicesTableLib MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
UefiDebugLibConOut MdePkg: Do not use CreateEventEx unless required 2020-01-10 03:25:59 +00:00
UefiDebugLibDebugPortProtocol MdePkg: Do not use CreateEventEx unless required 2020-01-10 03:25:59 +00:00
UefiDebugLibStdErr MdePkg: Do not use CreateEventEx unless required 2020-01-10 03:25:59 +00:00
UefiDevicePathLib MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
UefiDevicePathLibDevicePathProtocol MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
UefiDriverEntryPoint MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
UefiFileHandleLib MdePkg/UefiFileHandleLib: Tolerate more Root handle FileNames 2019-11-04 08:52:57 +08:00
UefiLib MdePkg: Update the comments of IsLanguageSupported 2019-11-20 15:03:24 +00:00
UefiMemoryAllocationLib MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
UefiMemoryLib MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
UefiPciLibPciRootBridgeIo MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
UefiPciSegmentLibPciRootBridgeIo MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
UefiRuntimeLib MdePkg: Do not use CreateEventEx unless required 2020-01-10 03:25:59 +00:00
UefiRuntimeServicesTableLib MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
UefiScsiLib MdePkg/UefiScsiLib: Set FUA bit for synchronous SCSI Write operations 2020-04-15 01:13:04 +00:00
UefiUsbLib MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00