]> git.proxmox.com Git - mirror_edk2.git/commit
OvmfPkg/VmgExitLib: Add support for IOIO_PROT NAE events
authorTom Lendacky <thomas.lendacky@amd.com>
Wed, 12 Aug 2020 20:21:37 +0000 (15:21 -0500)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Mon, 17 Aug 2020 02:46:39 +0000 (02:46 +0000)
commitfb040cced3b68f6a5ea88ec9881b362346d71c22
treee07ed76e9e0bd6a8ab3369ea7df3e51ad8fa3518
parent61bacc0fa16fd6f595a2c4222425cb6286e19977
OvmfPkg/VmgExitLib: Add support for IOIO_PROT NAE events

BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198

Under SEV-ES, a IOIO_PROT intercept generates a #VC exception. VMGEXIT
must be used to allow the hypervisor to handle this intercept.

Add support to construct the required GHCB values to support a IOIO_PROT
NAE event.  Parse the instruction that generated the #VC exception,
setting the required register values in the GHCB and creating the proper
SW_EXITINFO1 value in the GHCB.

Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Regression-tested-by: Laszlo Ersek <lersek@redhat.com>
OvmfPkg/Include/IndustryStandard/InstructionParsing.h [new file with mode: 0644]
OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c