summaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/traps.c
diff options
context:
space:
mode:
authorTom Lendacky <thomas.lendacky@amd.com>2020-09-07 15:15:42 +0200
committerBorislav Petkov <bp@suse.de>2020-09-09 11:33:19 +0200
commit885689e47dfa1499b756a07237eb645234d93cf9 (patch)
treead37684b76cb072a208d392192532eeb5fa736e0 /arch/x86/kernel/traps.c
parent1aa9aa8ee517e0443b06e816a4fd2d15f2113615 (diff)
downloadlinux-885689e47dfa1499b756a07237eb645234d93cf9.tar.bz2
x86/sev-es: Setup per-CPU GHCBs for the runtime handler
The runtime handler needs one GHCB per-CPU. Set them up and map them unencrypted. [ bp: Touchups and simplification. ] Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com> Signed-off-by: Joerg Roedel <jroedel@suse.de> Signed-off-by: Borislav Petkov <bp@suse.de> Link: https://lkml.kernel.org/r/20200907131613.12703-42-joro@8bytes.org
Diffstat (limited to 'arch/x86/kernel/traps.c')
-rw-r--r--arch/x86/kernel/traps.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c
index 81a2fb711091..2dc32b0ca38e 100644
--- a/arch/x86/kernel/traps.c
+++ b/arch/x86/kernel/traps.c
@@ -1074,6 +1074,9 @@ void __init trap_init(void)
/* Init cpu_entry_area before IST entries are set up */
setup_cpu_entry_areas();
+ /* Init GHCB memory pages when running as an SEV-ES guest */
+ sev_es_init_vc_handling();
+
idt_setup_traps();
/*