[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-3.4-testing] VMX: issue an NMI rather than just calling the NMI handler
# HG changeset patch # User Keir Fraser <keir.fraser@xxxxxxxxxx> # Date 1250696034 -3600 # Node ID 4af92eee8be497964912cda863c956691b3a3f89 # Parent 2d6c4cc6a2a9e48218fe31d443f8937a3a88bf3f VMX: issue an NMI rather than just calling the NMI handler when the VMEXIT code indicates that an NMI has been raised. Otherwise we might hit a real NMI while in the handler. Signed-off-by: Tim Deegan <Tim.Deegan@xxxxxxxxxx> xen-unstable changeset: 20059:76a65bf2aa4d xen-unstable date: Fri Aug 14 10:58:32 2009 +0100 --- xen/arch/x86/hvm/vmx/vmx.c | 4 +--- xen/arch/x86/nmi.c | 11 +++++++---- xen/include/asm-x86/apic.h | 1 + 3 files changed, 9 insertions(+), 7 deletions(-) diff -r 2d6c4cc6a2a9 -r 4af92eee8be4 xen/arch/x86/hvm/vmx/vmx.c --- a/xen/arch/x86/hvm/vmx/vmx.c Wed Aug 19 16:32:53 2009 +0100 +++ b/xen/arch/x86/hvm/vmx/vmx.c Wed Aug 19 16:33:54 2009 +0100 @@ -936,8 +936,6 @@ static void vmx_set_tsc_offset(struct vc vmx_vmcs_exit(v); } -void do_nmi(struct cpu_user_regs *); - static void vmx_init_hypercall_page(struct domain *d, void *hypercall_page) { char *p; @@ -2416,7 +2414,7 @@ asmlinkage void vmx_vmexit_handler(struc (X86_EVENTTYPE_NMI << 8) ) goto exit_and_crash; HVMTRACE_0D(NMI); - do_nmi(regs); /* Real NMI, vector 2: normal processing. */ + self_nmi(); /* Real NMI, vector 2: normal processing. */ break; case TRAP_machine_check: HVMTRACE_0D(MCE); diff -r 2d6c4cc6a2a9 -r 4af92eee8be4 xen/arch/x86/nmi.c --- a/xen/arch/x86/nmi.c Wed Aug 19 16:32:53 2009 +0100 +++ b/xen/arch/x86/nmi.c Wed Aug 19 16:33:54 2009 +0100 @@ -441,16 +441,19 @@ 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. */ -static void do_nmi_trigger(unsigned char key) +void self_nmi(void) { u32 id = get_apic_id(); - - printk("Triggering NMI on APIC ID %x\n", id); - local_irq_disable(); apic_wait_icr_idle(); apic_icr_write(APIC_DM_NMI | APIC_DEST_PHYSICAL, id); local_irq_enable(); +} + +static void do_nmi_trigger(unsigned char key) +{ + printk("Triggering NMI on APIC ID %x\n", get_apic_id()); + self_nmi(); } static void do_nmi_stats(unsigned char key) diff -r 2d6c4cc6a2a9 -r 4af92eee8be4 xen/include/asm-x86/apic.h --- a/xen/include/asm-x86/apic.h Wed Aug 19 16:32:53 2009 +0100 +++ b/xen/include/asm-x86/apic.h Wed Aug 19 16:33:54 2009 +0100 @@ -196,6 +196,7 @@ extern void setup_apic_nmi_watchdog (voi extern void setup_apic_nmi_watchdog (void); extern int reserve_lapic_nmi(void); extern void release_lapic_nmi(void); +extern void self_nmi(void); extern void disable_timer_nmi_watchdog(void); extern void enable_timer_nmi_watchdog(void); extern void nmi_watchdog_tick (struct cpu_user_regs *regs); _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |