diff options
author | Joerg Roedel <jroedel@suse.de> | 2020-09-08 14:38:16 +0200 |
---|---|---|
committer | Borislav Petkov <bp@suse.de> | 2020-09-09 11:32:27 +0200 |
commit | 1aa9aa8ee517e0443b06e816a4fd2d15f2113615 (patch) | |
tree | ad1f72353003e2342bc9be7a265fe6b9d64fe36f /arch/x86/include/asm/realmode.h | |
parent | x86/sev-es: Setup an early #VC handler (diff) | |
download | linux-1aa9aa8ee517e0443b06e816a4fd2d15f2113615.tar.xz linux-1aa9aa8ee517e0443b06e816a4fd2d15f2113615.zip |
x86/sev-es: Setup GHCB-based boot #VC handler
Add the infrastructure to handle #VC exceptions when the kernel runs on
virtual addresses and has mapped a GHCB. This handler will be used until
the runtime #VC handler takes over.
Since the handler runs very early, disable instrumentation for sev-es.c.
[ bp: Make vc_ghcb_invalidate() __always_inline so that it can be
inlined in noinstr functions like __sev_es_nmi_complete(). ]
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lkml.kernel.org/r/20200908123816.GB3764@8bytes.org
Diffstat (limited to 'arch/x86/include/asm/realmode.h')
-rw-r--r-- | arch/x86/include/asm/realmode.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/x86/include/asm/realmode.h b/arch/x86/include/asm/realmode.h index b35030eeec36..96118fb041b8 100644 --- a/arch/x86/include/asm/realmode.h +++ b/arch/x86/include/asm/realmode.h @@ -57,6 +57,9 @@ extern unsigned char real_mode_blob_end[]; extern unsigned long initial_code; extern unsigned long initial_gs; extern unsigned long initial_stack; +#ifdef CONFIG_AMD_MEM_ENCRYPT +extern unsigned long initial_vc_handler; +#endif extern unsigned char real_mode_blob[]; extern unsigned char real_mode_relocs[]; |