"handle" NMI by ignoring it.  Can't have been important, right?  As the
lguest64 hackers explained, handling NMI is a PITA.  Now oprofile does
not crash machine.

Signed-off-by: Rusty Russell <[EMAIL PROTECTED]>

diff -r 5beeb29ed3a3 arch/i386/lguest/hypervisor.S
--- a/arch/i386/lguest/hypervisor.S     Wed Feb 28 09:59:23 2007 +1100
+++ b/arch/i386/lguest/hypervisor.S     Wed Feb 28 09:59:47 2007 +1100
@@ -116,6 +116,11 @@ deliver_to_host:
        orl     %eax, %edx
        jmp     *%edx
 
+/* We ignore NMI and return. */
+handle_nmi:
+       addl    $8, %esp
+       iret
+
 /* Real hardware interrupts are delivered straight to the host.  Others
    cause us to return to run_guest_once so it can decide what to do.  Note
    that some of these are overridden by the guest to deliver directly, and
@@ -148,8 +153,7 @@ default_idt_entries:
 default_idt_entries:
 .text
        IRQ_STUBS 0 1 return_to_host            /* First two traps */
-/* FIXME: NMI needs something completely different.  Don't SWITCH_TO_HOST. */
-       IRQ_STUB 2 deliver_to_host              /* NMI */
+       IRQ_STUB 2 handle_nmi                   /* NMI */
        IRQ_STUBS 3 31 return_to_host           /* Rest of traps */
        IRQ_STUBS 32 127 deliver_to_host        /* Real interrupts */
        IRQ_STUB 128 return_to_host             /* System call (overridden) */


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to