]> git.proxmox.com Git - mirror_edk2.git/commitdiff
OvmfPkg/VmgExitLib: Set the SwScratch valid bit for IOIO events
authorTom Lendacky <thomas.lendacky@amd.com>
Fri, 6 Nov 2020 17:53:07 +0000 (11:53 -0600)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Tue, 10 Nov 2020 19:07:55 +0000 (19:07 +0000)
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3008

All fields that are set in the GHCB should have their associated bit in
the GHCB ValidBitmap field set. Add support to set the bit for the scratch
area field (SwScratch).

Fixes: 0020157a9825e5f5784ff014044f11c0558c92fe
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>
Cc: Tom Lendacky <thomas.lendacky@amd.com>
Cc: Brijesh Singh <brijesh.singh@amd.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Message-Id: <f817d034cea37fa78e00e86f61c3445f1208226d.1604685192.git.thomas.lendacky@amd.com>

OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c

index 7d14341d592b87c344b5964aa3452e5f53a50a8a..e5f14035b06f0c988cd4c548d89f1589e120fe1b 100644 (file)
@@ -1233,6 +1233,7 @@ IoioExit (
       }\r
 \r
       Ghcb->SaveArea.SwScratch = (UINT64) Ghcb->SharedBuffer;\r
+      VmgSetOffsetValid (Ghcb, GhcbSwScratch);\r
       Status = VmgExit (Ghcb, SVM_EXIT_IOIO_PROT, ExitInfo1, ExitInfo2);\r
       if (Status != 0) {\r
         return Status;\r