]> git.proxmox.com Git - mirror_edk2.git/commit
OvmfPkg/PlatformPei: Move early GDT into ram when SEV-ES is enabled
authorTom Lendacky <thomas.lendacky@amd.com>
Wed, 12 Aug 2020 20:21:40 +0000 (15:21 -0500)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Mon, 17 Aug 2020 02:46:39 +0000 (02:46 +0000)
commit13ed9e5fc052e4c6db257fdec6f427192f88870c
tree01f6773138b2454c8023caf3b560bb8eba438635
parent449a6e493418c337752b68e4f199bd2d7d39af9f
OvmfPkg/PlatformPei: Move early GDT into ram when SEV-ES is enabled

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

The SEV support will clear the C-bit from non-RAM areas.  The early GDT
lives in a non-RAM area, so when an exception occurs (like a #VC) the GDT
will be read as un-encrypted even though it is encrypted. This will result
in a failure to be able to handle the exception.

Move the GDT into RAM so it can be accessed without error when running as
an SEV-ES guest.

Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Ard Biesheuvel <ard.biesheuvel@arm.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>
OvmfPkg/PlatformPei/AmdSev.c