[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PULL 08/21] target/ppc/excp_helper: Take BQL before calling
From: |
David Gibson |
Subject: |
[Qemu-ppc] [PULL 08/21] target/ppc/excp_helper: Take BQL before calling cpu_interrupt() |
Date: |
Fri, 30 Jun 2017 20:46:19 +1000 |
From: Thomas Huth <address@hidden>
Since the introduction of MTTCG, using the msgsnd instruction
abort()s if being called without holding the BQL. So let's protect
that part of the code now with qemu_mutex_lock_iothread().
Buglink: https://bugs.launchpad.net/qemu/+bug/1694998
Signed-off-by: Thomas Huth <address@hidden>
Reviewed-by: Alex Bennée <address@hidden>
Signed-off-by: David Gibson <address@hidden>
---
target/ppc/excp_helper.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/target/ppc/excp_helper.c b/target/ppc/excp_helper.c
index 9cb2123..3a9f086 100644
--- a/target/ppc/excp_helper.c
+++ b/target/ppc/excp_helper.c
@@ -17,6 +17,7 @@
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#include "qemu/osdep.h"
+#include "qemu/main-loop.h"
#include "cpu.h"
#include "exec/helper-proto.h"
#include "exec/exec-all.h"
@@ -1132,6 +1133,7 @@ void helper_msgsnd(target_ulong rb)
return;
}
+ qemu_mutex_lock_iothread();
CPU_FOREACH(cs) {
PowerPCCPU *cpu = POWERPC_CPU(cs);
CPUPPCState *cenv = &cpu->env;
@@ -1141,5 +1143,6 @@ void helper_msgsnd(target_ulong rb)
cpu_interrupt(cs, CPU_INTERRUPT_HARD);
}
}
+ qemu_mutex_unlock_iothread();
}
#endif
--
2.9.4
- [Qemu-ppc] [PULL 00/21] ppc-for-2.10 queue 20170730, David Gibson, 2017/06/30
- [Qemu-ppc] [PULL 01/21] hw/ppc/prep: Remove superfluous call to soundhw_init(), David Gibson, 2017/06/30
- [Qemu-ppc] [PULL 02/21] qapi: add explicit null to string input and output visitors, David Gibson, 2017/06/30
- [Qemu-ppc] [PULL 06/21] spapr: Add a "no HPT" encoding to HTAB migration stream, David Gibson, 2017/06/30
- [Qemu-ppc] [PULL 09/21] target/ppc: Fix return value in tcg radix mmu fault handler, David Gibson, 2017/06/30
- [Qemu-ppc] [PULL 07/21] spapr: Fix migration of Radix guests, David Gibson, 2017/06/30
- [Qemu-ppc] [PULL 08/21] target/ppc/excp_helper: Take BQL before calling cpu_interrupt(),
David Gibson <=
- [Qemu-ppc] [PULL 10/21] xics: directly register ICPState objects to vmstate, David Gibson, 2017/06/30
- [Qemu-ppc] [PULL 04/21] pseries: Reset CPU compatibility mode, David Gibson, 2017/06/30
- [Qemu-ppc] [PULL 14/21] hw/ppc/spapr.c: consecutive 'spapr->patb_entry = 0' statements, David Gibson, 2017/06/30
- [Qemu-ppc] [PULL 05/21] ppc: Rework CPU compatibility testing across migration, David Gibson, 2017/06/30
- [Qemu-ppc] [PULL 18/21] spapr: Split DRC release from DRC detach, David Gibson, 2017/06/30
- [Qemu-ppc] [PULL 19/21] spapr: Make DRC reset force DRC into known state, David Gibson, 2017/06/30
- [Qemu-ppc] [PULL 15/21] target-ppc: Enable open-pic timers to count and generate interrupts, David Gibson, 2017/06/30
- [Qemu-ppc] [PULL 17/21] spapr: Eliminate DRC 'signalled' state variable, David Gibson, 2017/06/30
- [Qemu-ppc] [PULL 13/21] spapr: prevent QEMU crash when CPU realization fails, David Gibson, 2017/06/30
- [Qemu-ppc] [PULL 11/21] spapr: fix migration of ICPState objects from/to older QEMU, David Gibson, 2017/06/30