x86/boot/compressed/64: Add set_page_en/decrypted() helpers
authorJoerg Roedel <jroedel@suse.de>
Mon, 7 Sep 2020 13:15:23 +0000 (15:15 +0200)
committerBorislav Petkov <bp@suse.de>
Mon, 7 Sep 2020 17:45:25 +0000 (19:45 +0200)
commitc81d60029a1393183d2125fcb4b64831629b8864
treed43b1341d783e6aaf28b2d41f7c2503ca1e9e413
parent4b3fdca64a7e8ad90c87cad1fbc6991471f48dc7
x86/boot/compressed/64: Add set_page_en/decrypted() helpers

The functions are needed to map the GHCB for SEV-ES guests. The GHCB
is used for communication with the hypervisor, so its content must not
be encrypted. After the GHCB is not needed anymore it must be mapped
encrypted again so that the running kernel image can safely re-use the
memory.

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