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)
the idea is to push down an iret frame to the kernel stack that will
just jump to the next instruction and gets it out of the NMI nesting.
Note: interrupts will/must still be disabled, despite the iret. (the
ordering of the pushes might be wrong, we might need more than that for
a valid iret, etc. etc.)
Ingo
--