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"); This bug was originally seen when using tboot to boot Xen. To prevent this from happening, enable NMIs during cpu_init(). Signed-off-by: Sergey Dyasli <sergey.dya...@citrix.com> --- CC: Jan Beulich <jbeul...@suse.com> CC: Andrew Cooper <andrew.coop...@citrix.com> CC: Wei Liu <wei.l...@citrix.com> --- xen/arch/x86/cpu/common.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xen/arch/x86/cpu/common.c b/xen/arch/x86/cpu/common.c index 057859ab14..09fbd98764 100644 --- a/xen/arch/x86/cpu/common.c +++ b/xen/arch/x86/cpu/common.c @@ -819,6 +819,8 @@ void cpu_init(void) #define CD(register) asm volatile ( "mov %0,%%db" #register : : "r"(0UL) ); CD(0); CD(1); CD(2); CD(3); /* no db4 and db5 */; CD(6); CD(7); #undef CD + + enable_nmis(); } void cpu_uninit(unsigned int cpu) -- 2.17.1 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel