cc: to qemu-stable as a late "could we backport this (plus the commit fixing a bug in this)" request...
On Wed, 10 Jun 2026 at 17:12, Peter Maydell <[email protected]> wrote: > > From: Alex Bennée <[email protected]> > > With the advent of WFE and WFI we need to pay closer attention to the > reason why the vCPU may be sleeping to figure out if we should wake > it up. > > Create env->halt_reason to track this and then re-order the tests so > we: > > - ignore everything is the vCPU is powered off > - wake up if the event_register is set and we were in a WFE > - otherwise any IRQ event does wake the vCPU up. > > Reviewed-by: Richard Henderson <[email protected]> > Signed-off-by: Alex Bennée <[email protected]> > Message-id: [email protected] > Signed-off-by: Peter Maydell <[email protected]> I didn't realize at the time, but this is actually fixing a bug, which was just reported via the qemu-discuss list: https://lists.gnu.org/archive/html/qemu-discuss/2026-07/msg00000.html For M-profile, we already added SEV/WFE support, and that's in the 11.0 release, but arm_cpu_has_work() incorrectly checks for the event register before it checks whether the CPU is powered off. This only affects M-profile machines with multiple CPUs, and the effect is that a SEV on core 0 incorrectly starts core 1 when it's powered down. Could we backport this change (commit 6fd2fcdc61b70) plus the bugfix followup (commit c2804566f654 "target/arm: do not clear halting reason in has_work helper") to the 11.0.x branch, please? (Earlier branches don't have SEV wake anything up so don't need a backport.) thanks -- PMM
