Commit b98b854842 for qemu.org

commit b98b854842cc88aae8ffc0a0d79d2d9730b01076
Author: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
Date:   Thu Nov 19 08:24:55 2026 +0100

    target/arm: Kick other vCPUs on SEV under TCG round-robin

    In round-robin (single-thread) TCG, all vCPUs share one
    host thread, so qemu_cpu_is_self() is true for every vCPU.

    The SEV helper used it to skip the kick of the issuing vCPU,
    and so skipped it for every other vCPU too: a vCPU sleeping
    in WFE is only woken when the RR kick timer fires.

    Compare against the issuing vCPU instead.

    Fixes: d238858bff60 ("target/arm: Implement WFE, SEV and SEVONPEND")
    Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
    Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
    Message-ID: <20261119225514.4080-5-philmd@oss.qualcomm.com>

diff --git a/target/arm/tcg/op_helper.c b/target/arm/tcg/op_helper.c
index a862b9eb02..c2fdad7411 100644
--- a/target/arm/tcg/op_helper.c
+++ b/target/arm/tcg/op_helper.c
@@ -470,14 +470,14 @@ void HELPER(wfit)(CPUARMState *env, uint32_t rd)

 void HELPER(sev)(CPUARMState *env)
 {
-    CPUState *cs;
+    CPUState *self = env_cpu(env), *cs;

     BQL_LOCK_GUARD();

     CPU_FOREACH(cs) {
         ARMCPU *target_cpu = ARM_CPU(cs);
         target_cpu->env.event_register = true;
-        if (!qemu_cpu_is_self(cs)) {
+        if (cs != self) {
             qemu_cpu_kick(cs);
         }
     }