]> git.proxmox.com Git - mirror_edk2.git/commit
OvmfPkg/VmgExitLib: Add support for NPF NAE events (MMIO)
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)
commitc45f678a1ea2080344e125dc55b14e4b9f98483d
tree0aa3cb8151bbf9897665eb64aef18ba7c0728ffe
parent9711c9230b5485e3e652b21c5eb6da0e07e6394c
OvmfPkg/VmgExitLib: Add support for NPF NAE events (MMIO)

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

Under SEV-ES, a NPF intercept for an NPT entry with a reserved bit set
generates a #VC exception. This condition is assumed to be an MMIO access.
VMGEXIT must be used to allow the hypervisor to handle this intercept.

Add support to construct the required GHCB values to support a NPF NAE
event for MMIO.  Parse the instruction that generated the #VC exception,
setting the required register values in the GHCB and creating the proper
SW_EXIT_INFO1, SW_EXITINFO2 and SW_SCRATCH values 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/Library/VmgExitLib/VmgExitVcHandler.c