]> 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:44 +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 a05bdf78c982e4e038f08ecfc2fe9c6c034cc124..a8d05019967ad0268a71bb0e1a7bbd85e5972d09 100644 (file)
@@ -283,7 +283,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));
     }
     qemu_mutex_unlock_iothread();
 }