Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <david.vrabel@citrix.com>
Reported-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Tested-by: Vitaly Kuznetsov <vkuznets@redhat.com>

+1 -8
+1 -8
arch/x86/xen/setup.c
··· 594 594 } 595 595 #endif /* CONFIG_X86_64 */ 596 596 } 597 - void xen_enable_nmi(void) 598 - { 599 - #ifdef CONFIG_X86_64 600 - if (register_callback(CALLBACKTYPE_nmi, (char *)nmi)) 601 - BUG(); 602 - #endif 603 - } 597 + 604 598 void __init xen_pvmmu_arch_setup(void) 605 599 { 606 600 HYPERVISOR_vm_assist(VMASST_CMD_enable, VMASST_TYPE_4gb_segments); ··· 609 615 610 616 xen_enable_sysenter(); 611 617 xen_enable_syscall(); 612 - xen_enable_nmi(); 613 618 } 614 619 615 620 /* This function is not called for HVM domains */