x86/boot: enable NMIs after traps init
authorSergey Dyasli <sergey.dyasli@citrix.com>
Mon, 5 Nov 2018 14:02:22 +0000 (15:02 +0100)
committerJan Beulich <jbeulich@suse.com>
Mon, 5 Nov 2018 14:02:22 +0000 (15:02 +0100)
commite2436396ed340ade278c29faa9da52a0bd4ae7bc
tree0e667b963d16c639738f395900eb5d5630f71df7
parentf0b4b6995c0ce1ae9b7ae5fde71cd1ba1d148f9a
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>
master commit: 072e054359a4d4a4f6c3fa09585667472c4f0f1d
master date: 2018-10-23 12:33:54 +0100
xen/arch/x86/cpu/common.c
xen/arch/x86/setup.c