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:24:24 EST
On Mon, May 03 2021 at 22:13, Thomas Gleixner wrote:
> 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.
Bah, no. This patch breaks 32bit because on 32bit nothing sets the entry
to asm_exc_nmi() later on.
Thanks,
tglx