Skip to contentSkip to conversation

target-i386: wake up processors that receive an SMI

PATCH In review Paolo Bonzini 2 participants 2 messages May 19, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 target-i386: wake up processors that receive an SMI

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.

---
 target-i386/cpu.c | 1 +
 1 file changed, 1 insertion(+)
target-i386/cpu.c +1 -0
index 7b6f9e4..4c4496b 100644
@@ -2982,6 +2982,7 @@ static bool x86_cpu_has_work(CPUState *cs)
     return ((cs->interrupt_request & CPU_INTERRUPT_HARD) &&
             (env->eflags & IF_MASK)) ||
            (cs->interrupt_request & (CPU_INTERRUPT_NMI |
+                                     CPU_INTERRUPT_SMI |
                                      CPU_INTERRUPT_INIT |
                                      CPU_INTERRUPT_SIPI |
                                      CPU_INTERRUPT_MCE));
Signature · 1 line
2.4.0
#1 lore raw
Quoted 16 lines · Paolo Bonzini

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.

---
 target-i386/cpu.c | 1 +
 1 file changed, 1 insertion(+)
target-i386/cpu.c +0 -0
index 7b6f9e4..4c4496b 100644

target-i386/cpu.c static bool x86_cpu_has_work(CPUState *cs) · line 2988

Quoted 7 lines
target-i386/cpu.c +1 -0
@@ -2982,6 +2982,7 @@ static bool x86_cpu_has_work(CPUState *cs)
     return ((cs->interrupt_request & CPU_INTERRUPT_HARD) &&
             (env->eflags & IF_MASK)) ||
            (cs->interrupt_request & (CPU_INTERRUPT_NMI |
+                                     CPU_INTERRUPT_SMI |
                                      CPU_INTERRUPT_INIT |
                                      CPU_INTERRUPT_SIPI |
                                      CPU_INTERRUPT_MCE));

Great, that's something I should look into then. I'll apply this and then see what's up with the assertion failure.

Thanks!
Laszlo