x86/sev-es: Setup an early #VC handler
authorJoerg Roedel <jroedel@suse.de>
Tue, 8 Sep 2020 12:35:17 +0000 (14:35 +0200)
committerBorislav Petkov <bp@suse.de>
Wed, 9 Sep 2020 08:45:24 +0000 (10:45 +0200)
commit74d8d9d531b4cc945a9f75aa2fc21d99ca5a9fe3
treeba719ed3c3be8531a375850a80df229a29c375e1
parentf980f9c31a923e9040dee0bc679a5f5b09e61f40
x86/sev-es: Setup an early #VC handler

Setup an early handler for #VC exceptions. There is no GHCB mapped
yet, so just re-use the vc_no_ghcb_handler(). It can only handle
CPUID exit-codes, but that should be enough to get the kernel through
verify_cpu() and __startup_64() until it runs on virtual addresses.

Signed-off-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: Borislav Petkov <bp@suse.de>
[ boot failure Error: kernel_ident_mapping_init() failed. ]
Reported-by: kernel test robot <lkp@intel.com>
Link: https://lkml.kernel.org/r/20200908123517.GA3764@8bytes.org
arch/x86/include/asm/sev-es.h
arch/x86/kernel/head64.c
arch/x86/kernel/head_64.S