diff mbox

[v2,06/23] target-i386: wake up processors that receive an SMI

Message ID 1433351328-23326-7-git-send-email-pbonzini@redhat.com
State New
Headers show

Commit Message

Paolo Bonzini June 3, 2015, 5:08 p.m. UTC
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 | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff mbox

Patch

diff --git a/target-i386/cpu.c b/target-i386/cpu.c
index 3305e09..523d0cd 100644
--- a/target-i386/cpu.c
+++ b/target-i386/cpu.c
@@ -2941,7 +2941,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[] = {