x86/boot: enable NMIs after traps init
authorSergey Dyasli <sergey.dyasli@citrix.com>
Tue, 23 Oct 2018 10:59:12 +0000 (11:59 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 23 Oct 2018 11:33:54 +0000 (12:33 +0100)
commit072e054359a4d4a4f6c3fa09585667472c4f0f1d
tree23f773874d27fd5de3d762586ae853ceb9f05696
parent76bfbcec423e83c4ed975645ebf5a9a4ad2494f7
x86/boot: enable NMIs after traps init

In certain scenarios, NMIs might be disabled during Xen boot process.
Such situation will cause alternative_instructions() to:

    panic("Timed out waiting for alternatives self-NMI to hit\n");

This bug was originally seen when using Tboot to boot Xen 4.11

To prevent this from happening, enable NMIs during cpu_init() and
during __start_xen() for BSP.

Signed-off-by: Sergey Dyasli <sergey.dyasli@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/cpu/common.c
xen/arch/x86/setup.c