From: David Vrabel Date: Mon, 16 Jun 2014 11:07:00 +0000 (+0200) Subject: x86/xen: no need to explicitly register an NMI callback X-Git-Tag: MMI-PSA29.97-13-9~11844^2~4 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ea9f9274bf4337ba7cbab241c780487651642d63;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git x86/xen: no need to explicitly register an NMI callback Remove xen_enable_nmi() to fix a 64-bit guest crash when registering the NMI callback on Xen 3.1 and earlier. It's not needed since the NMI callback is set by a set_trap_table hypercall (in xen_load_idt() or xen_write_idt_entry()). It's also broken since it only set the current VCPU's callback. Signed-off-by: David Vrabel Reported-by: Vitaly Kuznetsov Tested-by: Vitaly Kuznetsov --- diff --git a/arch/x86/xen/setup.c b/arch/x86/xen/setup.c index bdd22ece586f..e366b9855376 100644 --- a/arch/x86/xen/setup.c +++ b/arch/x86/xen/setup.c @@ -594,13 +594,7 @@ void xen_enable_syscall(void) } #endif /* CONFIG_X86_64 */ } -void xen_enable_nmi(void) -{ -#ifdef CONFIG_X86_64 - if (register_callback(CALLBACKTYPE_nmi, (char *)nmi)) - BUG(); -#endif -} + void __init xen_pvmmu_arch_setup(void) { HYPERVISOR_vm_assist(VMASST_CMD_enable, VMASST_TYPE_4gb_segments); @@ -615,7 +609,6 @@ void __init xen_pvmmu_arch_setup(void) xen_enable_sysenter(); xen_enable_syscall(); - xen_enable_nmi(); } /* This function is not called for HVM domains */