504a505
> // WFE Sleeps if SevMailbox==0 and no unmasked interrupts are pending
507a509,510
> } else if (xc->tcBase()->getCpuPtr()->getInterruptController()->checkInterrupts(xc->tcBase())) {
> PseudoInst::quiesceSkip(xc->tcBase());
512a516,522
> wfePredFixUpCode = '''
> #if FULL_SYSTEM
> // WFE is predicated false, reset SevMailbox to reduce spurious sleeps
> // and SEV interrupts
> SevMailbox = 1;
> #endif
> '''
514c524,526
< { "code" : wfeCode, "predicate_test" : predicateTest },
---
> { "code" : wfeCode,
> "pred_fixup" : wfePredFixUpCode,
> "predicate_test" : predicateTest },
518c530
< exec_output += QuiescePredOpExecute.subst(wfeIop)
---
> exec_output += QuiescePredOpExecuteWithFixup.subst(wfeIop)
538c550
< // Need a way for O3 to not scoreboard these accesses as pipe flushes.
---
> #if FULL_SYSTEM
545c557
< // Only wake if they were sleeping
---
> // Wake CPU with interrupt if they were sleeping
547,548c559,560
< oc->setMiscReg(MISCREG_SEV_MAILBOX, 1);
< PseudoInst::wakeCPU(xc->tcBase(), x);
---
> // Post Interrupt and wake cpu if needed
> oc->getCpuPtr()->postInterrupt(INT_SEV, 0);
550a563
> #endif