lkml.org 
[lkml]   [2007]   [Mar]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH 9/9] lguest: don't crash host on NMI
From
Date
"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 <rusty@rustcorp.com.au>

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 majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-03-09 04:37    [W:0.053 / U:0.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site