|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] x86/nmi: self_nmi() should not unconditionally enable interrupts
# HG changeset patch
# User Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
# Date 1352973278 0
# Node ID b9b4456e12d1e207a12ee70562334708f7ea3ab2
# Parent f50e2f4278ab45e2b2c2650dd10c694ffda68ba0
x86/nmi: self_nmi() should not unconditionally enable interrupts
It seems that all current callers have interrupts enabled, making the
code currently safe but dangerous. Also, fix a trailing whitespace
issue.
Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
Committed-by: Keir Fraser <keir@xxxxxxx>
---
diff -r f50e2f4278ab -r b9b4456e12d1 xen/arch/x86/nmi.c
--- a/xen/arch/x86/nmi.c Thu Nov 15 09:52:12 2012 +0000
+++ b/xen/arch/x86/nmi.c Thu Nov 15 09:54:38 2012 +0000
@@ -482,13 +482,14 @@ void nmi_watchdog_tick(struct cpu_user_r
* 8-3 and 8-4 in IA32 Reference Manual Volume 3. We send the IPI to
* our own APIC ID explicitly which is valid.
*/
-void self_nmi(void)
+void self_nmi(void)
{
+ unsigned long flags;
u32 id = get_apic_id();
- local_irq_disable();
+ local_irq_save(flags);
apic_wait_icr_idle();
apic_icr_write(APIC_DM_NMI | APIC_DEST_PHYSICAL, id);
- local_irq_enable();
+ local_irq_restore(flags);
}
static void do_nmi_trigger(unsigned char key)
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |