Re: [PATCH], issue EOI to APIC prior to calling crash_kexec in die_nmi path

Andi Kleen
2008-02-08T17:23:36Z

Ingo Molnar <mingo-X9Un+BFzKDI@public.gmane.org> writes:
>
> try a dummy iret, something like:
>
> asm volatile ("pushf; push $1f; iret; 1: \n");
>
> to get the CPU out of its 'nested NMI' state. (totally untested)

Just if you do this while running on the NMI stack (and I think
you do if you insert it at the same place as Neil's original patch)
and another NMI happens for some reason you will be dead
because your stack will corrupt.

If you really want nested NMIs you would need to fix up the NMI
stacks first by pointing them below your own stack.

-Andi