[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 07/25] hw/ppc: Fix iothread locking in the 405 code
From: |
David Gibson |
Subject: |
[PULL 07/25] hw/ppc: Fix iothread locking in the 405 code |
Date: |
Thu, 21 Oct 2021 15:20:09 +1100 |
From: Thomas Huth <thuth@redhat.com>
When using u-boot as firmware with the taihu board, QEMU aborts with
this assertion:
ERROR:../accel/tcg/tcg-accel-ops.c:79:tcg_handle_interrupt: assertion failed:
(qemu_mutex_iothread_locked())
Running QEMU with "-d in_asm" shows that the crash happens when writing
to SPR 0x3f2, so we are missing to lock the iothread in the code path
here.
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20211006071140.565952-1-thuth@redhat.com>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Tested-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
---
hw/ppc/ppc.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/hw/ppc/ppc.c b/hw/ppc/ppc.c
index a724b0bb5e..e8127599c9 100644
--- a/hw/ppc/ppc.c
+++ b/hw/ppc/ppc.c
@@ -336,6 +336,8 @@ void store_40x_dbcr0(CPUPPCState *env, uint32_t val)
{
PowerPCCPU *cpu = env_archcpu(env);
+ qemu_mutex_lock_iothread();
+
switch ((val >> 28) & 0x3) {
case 0x0:
/* No action */
@@ -353,6 +355,8 @@ void store_40x_dbcr0(CPUPPCState *env, uint32_t val)
ppc40x_system_reset(cpu);
break;
}
+
+ qemu_mutex_unlock_iothread();
}
/* PowerPC 40x internal IRQ controller */
--
2.31.1
- [PULL 10/25] target/ppc: Fix XER access in gdbstub, (continued)
- [PULL 10/25] target/ppc: Fix XER access in gdbstub, David Gibson, 2021/10/21
- [PULL 03/25] target/ppc: Use tcg_constant_i64() in gen_brh(), David Gibson, 2021/10/21
- [PULL 01/25] spapr/xive: Add source status helpers, David Gibson, 2021/10/21
- [PULL 11/25] linux-user: Fix XER access in ppc version of elf_core_copy_regs, David Gibson, 2021/10/21
- [PULL 05/25] hw/ppc/spapr_softmmu: Reduce include list, David Gibson, 2021/10/21
- [PULL 04/25] target/ppc: Fix the test raising the decrementer exception, David Gibson, 2021/10/21
- [PULL 02/25] target/ppc: Use tcg_constant_i32() in gen_setb(), David Gibson, 2021/10/21
- [PULL 18/25] ppc/pegasos2: Implement power-off RTAS function with VOF, David Gibson, 2021/10/21
- [PULL 19/25] tests/acceptance: Add a test for the bamboo ppc board, David Gibson, 2021/10/21
- [PULL 12/25] target/ppc: Fix XER access in monitor, David Gibson, 2021/10/21
- [PULL 07/25] hw/ppc: Fix iothread locking in the 405 code,
David Gibson <=
- [PULL 09/25] linux-user/ppc: Fix XER access in save/restore_user_regs, David Gibson, 2021/10/21
- [PULL 14/25] ppc/pegasos2: Warn when using VOF but no kernel is specified, David Gibson, 2021/10/21
- [PULL 15/25] ppc/pegasos2: Implement get-time-of-day RTAS function with VOF, David Gibson, 2021/10/21
- [PULL 20/25] target/ppc: Filter mtmsr[d] input before setting MSR, David Gibson, 2021/10/21
- [PULL 13/25] ppc/pegasos2: Restrict memory to 2 gigabytes, David Gibson, 2021/10/21
- [PULL 17/25] ppc/pegasos2: Add constants for PCI config addresses, David Gibson, 2021/10/21
- [PULL 16/25] ppc/pegasos2: Access MV64361 registers via their memory region, David Gibson, 2021/10/21
- [PULL 22/25] target/ppc: add user read/write functions for MMCR0, David Gibson, 2021/10/21
- [PULL 06/25] spapr/xive: Use xive_esb_rw() to trigger interrupts, David Gibson, 2021/10/21
- [PULL 08/25] tests/acceptance: Add tests for the ppc405 boards, David Gibson, 2021/10/21