486c486
< if (SevMailbox) {
---
> if (SevMailbox == 1) {
489,490c489
< }
< else {
---
> } else {
504c503,508
< PseudoInst::quiesce(xc->tcBase());
---
> // WFI doesn't sleep if interrupts are pending (masked or not)
> if (xc->tcBase()->getCpuPtr()->getInterruptController()->checkRaw()) {
> PseudoInst::quiesceSkip(xc->tcBase());
> } else {
> PseudoInst::quiesce(xc->tcBase());
> }
520c524,527
< if (oc != xc->tcBase()) {
---
> if (oc == xc->tcBase())
> continue;
> // Only wake if they were sleeping
> if (oc->readMiscReg(MISCREG_SEV_MAILBOX) == 0) {
521a529
> PseudoInst::wakeCPU(xc->tcBase(), x);