Re: [PATCH] x86/cpu: Init exception handling from cpu_init()

From: Joerg Roedel
Date: Thu May 06 2021 - 05:13:04 EST


On Tue, May 04, 2021 at 07:17:45PM +0200, Borislav Petkov wrote:
> From: Borislav Petkov <bp@xxxxxxx>
>
> SEV-ES guests require properly setup task register with which the TSS
> descriptor in the GDT can be located so that the IST-type #VC exception
> handler which they need to function properly, can be executed.
>
> This setup needs to happen before attempting to load microcode in
> ucode_cpu_init() which can cause such #VC exceptions.
>
> Simplify the machinery by running that exception setup from cpu_init()
> directly.
>
> There should be no functional changes resulting from this patch.
>
> Signed-off-by: Borislav Petkov <bp@xxxxxxx>
> ---
> arch/x86/include/asm/processor.h | 1 -
> arch/x86/kernel/cpu/common.c | 14 +++-----------
> arch/x86/kernel/smpboot.c | 1 -
> 3 files changed, 3 insertions(+), 13 deletions(-)

Acked-by: Joerg Roedel <jroedel@xxxxxxx>