x86/boot/compressed/64: Unmap GHCB page before booting the kernel
authorJoerg Roedel <jroedel@suse.de>
Mon, 7 Sep 2020 13:15:25 +0000 (15:15 +0200)
committerBorislav Petkov <bp@suse.de>
Mon, 7 Sep 2020 17:45:26 +0000 (19:45 +0200)
commit69add17a7c1992593a7cf775a66e0256ad4b3ef8
tree74d7dd41c4f9fc80d5bfd12498b6ac6029d3bfd7
parent597cfe48212a3f110ab0f918bf59791f453e65b7
x86/boot/compressed/64: Unmap GHCB page before booting the kernel

Force a page-fault on any further accesses to the GHCB page when they
shouldn't happen anymore. This will catch any bugs where a #VC exception
is raised even though none is expected anymore.

Signed-off-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lkml.kernel.org/r/20200907131613.12703-25-joro@8bytes.org
arch/x86/boot/compressed/ident_map_64.c
arch/x86/boot/compressed/misc.h
arch/x86/boot/compressed/sev-es.c