From: Rusty Russell <rusty@rustcorp.com.au>
To: Andrew Morton <akpm@osdl.org>
Cc: Andi Kleen <ak@muc.de>,
lkml - Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: [PATCH 9/9] lguest: don't crash host on NMI
Date: Fri, 09 Mar 2007 14:32:56 +1100 [thread overview]
Message-ID: <1173411176.32234.94.camel@localhost.localdomain> (raw)
In-Reply-To: <1173411000.32234.90.camel@localhost.localdomain>
"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) */
next prev parent reply other threads:[~2007-03-09 3:33 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-09 3:05 [PATCH 1/9] lguest: block device speedup Rusty Russell
2007-03-09 3:08 ` [PATCH 2/9] lguest: bridging support in example code Rusty Russell
2007-03-09 3:12 ` [PATCH 3/9] lguest: cleanup: allocate separate pages for switcher code Rusty Russell
2007-03-09 3:16 ` [PATCH 4/9] lguest: cleanup: clean up regs save/restore Rusty Russell
2007-03-09 3:17 ` [PATCH 5/9] lguest: documentation fixes Rusty Russell
2007-03-09 3:19 ` [PATCH 6/9] lguest: pin stack page optimization Rusty Russell
2007-03-09 3:23 ` [PATCH 7/9] lguest: use read-only pages rather than segments to protect high-mapped switcher Rusty Russell
2007-03-09 3:30 ` [PATCH 8/9] lguest: Optimize away copy in and out of per-cpu guest pages Rusty Russell
2007-03-09 3:32 ` Rusty Russell [this message]
2007-03-09 7:51 ` [PATCH 1/9] lguest: block device speedup Christoph Hellwig
2007-03-09 8:09 ` Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1173411176.32234.94.camel@localhost.localdomain \
--to=rusty@rustcorp.com.au \
--cc=ak@muc.de \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox