target-i386: wake up processors that receive an SMI
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 19 May 2015 11:46:47 +0000 (13:46 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 5 Jun 2015 15:10:01 +0000 (17:10 +0200)
An SMI should definitely wake up a processor in halted state!
This lets OVMF boot with SMM on multiprocessor systems, although
it halts very soon after that with a "CpuIndex != BspIndex"
assertion failure.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
target-i386/cpu.c

index 99ad551bee32bc0f3e8c176100a6abcadda6cf1d..0faca03595e4b9dfc20994f2f7dd60bf8d0d4912 100644 (file)
@@ -3063,7 +3063,9 @@ static bool x86_cpu_has_work(CPUState *cs)
            (cs->interrupt_request & (CPU_INTERRUPT_NMI |
                                      CPU_INTERRUPT_INIT |
                                      CPU_INTERRUPT_SIPI |
-                                     CPU_INTERRUPT_MCE));
+                                     CPU_INTERRUPT_MCE)) ||
+           ((cs->interrupt_request & CPU_INTERRUPT_SMI) &&
+            !(env->hflags & HF_SMM_MASK));
 }
 
 static Property x86_cpu_properties[] = {