summaryrefslogtreecommitdiff
path: root/arch/x86/boot/compressed/misc.h
diff options
context:
space:
mode:
authorJoerg Roedel <jroedel@suse.de>2020-09-07 16:15:23 +0300
committerBorislav Petkov <bp@suse.de>2020-09-07 20:45:25 +0300
commitc81d60029a1393183d2125fcb4b64831629b8864 (patch)
treed43b1341d783e6aaf28b2d41f7c2503ca1e9e413 /arch/x86/boot/compressed/misc.h
parent4b3fdca64a7e8ad90c87cad1fbc6991471f48dc7 (diff)
downloadlinux-c81d60029a1393183d2125fcb4b64831629b8864.tar.xz
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
Diffstat (limited to 'arch/x86/boot/compressed/misc.h')
-rw-r--r--arch/x86/boot/compressed/misc.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86/boot/compressed/misc.h b/arch/x86/boot/compressed/misc.h
index eaa8b45ebccb..01c0fb3417ca 100644
--- a/arch/x86/boot/compressed/misc.h
+++ b/arch/x86/boot/compressed/misc.h
@@ -98,6 +98,8 @@ static inline void choose_random_location(unsigned long input,
#endif
#ifdef CONFIG_X86_64
+extern int set_page_decrypted(unsigned long address);
+extern int set_page_encrypted(unsigned long address);
extern unsigned char _pgtable[];
#endif