diff options
author | Joerg Roedel <jroedel@suse.de> | 2021-03-10 09:43:22 +0100 |
---|---|---|
committer | Borislav Petkov <bp@suse.de> | 2021-03-18 23:03:43 +0100 |
commit | 1ccdbf748d862bc2ea106fa9f2300983c77860fe (patch) | |
tree | 91a8447e852b35c4d22f4c176a16ea957e8d9da6 /arch/x86/boot/compressed/head_64.S | |
parent | 79419e13e8082cc15d174df979a363528e31f2e7 (diff) | |
download | linux-stable-1ccdbf748d862bc2ea106fa9f2300983c77860fe.tar.gz linux-stable-1ccdbf748d862bc2ea106fa9f2300983c77860fe.tar.bz2 linux-stable-1ccdbf748d862bc2ea106fa9f2300983c77860fe.zip |
x86/boot/compressed/64: Add 32-bit boot #VC handler
Add a #VC exception handler which is used when the kernel still executes
in protected mode. This boot-path already uses CPUID, which will cause #VC
exceptions in an SEV-ES guest.
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lkml.kernel.org/r/20210312123824.306-6-joro@8bytes.org
Diffstat (limited to 'arch/x86/boot/compressed/head_64.S')
-rw-r--r-- | arch/x86/boot/compressed/head_64.S | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/x86/boot/compressed/head_64.S b/arch/x86/boot/compressed/head_64.S index 2001c3bf0748..ee448aedb8b0 100644 --- a/arch/x86/boot/compressed/head_64.S +++ b/arch/x86/boot/compressed/head_64.S @@ -34,6 +34,7 @@ #include <asm/asm-offsets.h> #include <asm/bootparam.h> #include <asm/desc_defs.h> +#include <asm/trapnr.h> #include "pgtable.h" /* @@ -857,6 +858,11 @@ SYM_FUNC_END(startup32_set_idt_entry) SYM_FUNC_START(startup32_load_idt) #ifdef CONFIG_AMD_MEM_ENCRYPT + /* #VC handler */ + leal rva(startup32_vc_handler)(%ebp), %eax + movl $X86_TRAP_VC, %edx + call startup32_set_idt_entry + /* Load IDT */ leal rva(boot32_idt)(%ebp), %eax movl %eax, rva(boot32_idt_desc+2)(%ebp) |