Re: [PATCH 2/4] x86/entry: Use asm_noist_exc_nmi() for NMI in early booting stage

From: Thomas Gleixner
Date: Mon May 03 2021 - 16:13:23 EST


On Tue, Apr 27 2021 at 07:09, Lai Jiangshan wrote:
> + *
> + * While the other entries for the exceptions which use Interrupt stacks can
> + * be also used on the kernel stack, asm_exc_nmi() can not be used on the
> + * kernel stack for it relies on the RSP-located "NMI executing" variable
> + * which expects to on a fixed location in the NMI IST stack. For early
> + * booting stage, asm_noist_exc_nmi() is used for NMI.
> */
> static const __initconst struct idt_data def_idts[] = {
> INTG(X86_TRAP_DE, asm_exc_divide_error),
> - INTG(X86_TRAP_NMI, asm_exc_nmi),
> + INTG(X86_TRAP_NMI, asm_noist_exc_nmi),

Actually this is a x86_64 only problem. The 32bit variant is fine, but
for consistency there is no problem to have that extra entry point on
32bit as well.

Thanks,

tglx