]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
target/ppc: Fix mtDPDES targeting SMT siblings
authorNicholas Piggin <npiggin@gmail.com>
Tue, 6 Aug 2024 13:13:13 +0000 (23:13 +1000)
committerMichael Tokarev <mjt@tls.msk.ru>
Sun, 10 Nov 2024 08:09:27 +0000 (11:09 +0300)
A typo in the loop over SMT threads to set irq level for doorbells
when storing to DPDES meant everything was aimed at the CPU executing
the instruction.

Cc: qemu-stable@nongnu.org
Fixes: d24e80b2ae ("target/ppc: Add msgsnd/p and DPDES SMT support")
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
(cherry picked from commit 0324d236d2918c18a9ad4a1081b1083965a1433b)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
target/ppc/misc_helper.c

index 58e808dc96b5feae15f26c5749ca12e8c723f627..45ab8e4416d4d08bf3a6045e42fd6c0a7d78ca21 100644 (file)
@@ -280,7 +280,7 @@ void helper_store_dpdes(CPUPPCState *env, target_ulong val)
         PowerPCCPU *ccpu = POWERPC_CPU(ccs);
         uint32_t thread_id = ppc_cpu_tir(ccpu);
 
-        ppc_set_irq(cpu, PPC_INTERRUPT_DOORBELL, val & (0x1 << thread_id));
+        ppc_set_irq(ccpu, PPC_INTERRUPT_DOORBELL, val & (0x1 << thread_id));
     }
     bql_unlock();
 }