[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 04/15] target/mips: hold BQL in mips_vpe_wake()
From: |
Aleksandar Markovic |
Subject: |
[Qemu-devel] [PULL 04/15] target/mips: hold BQL in mips_vpe_wake() |
Date: |
Thu, 14 Feb 2019 18:47:13 +0100 |
From: Goran Ferenc <address@hidden>
Hold BQL whenever mips_vpe_wake() is invoked.
Without this patch, MIPS MT with MTTCG enabled triggers an abort in
tcg_handle_interrupt() due to an unlocked access to cpu_interrupt().
This patch makes sure that the BQL is held in this case.
Signed-off-by: Goran Ferenc <address@hidden>
Signed-off-by: Miodrag Dinic <address@hidden>
Signed-off-by: Aleksandar Markovic <address@hidden>
Acked-by: Alex Bennée <address@hidden>
Reviewed-by: Alex Bennée <address@hidden>
---
target/mips/op_helper.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/target/mips/op_helper.c b/target/mips/op_helper.c
index 8c53b3b..0f272a5 100644
--- a/target/mips/op_helper.c
+++ b/target/mips/op_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 "internal.h"
#include "qemu/host-utils.h"
@@ -638,7 +639,9 @@ static inline void mips_vpe_wake(MIPSCPU *c)
/* Don't set ->halted = 0 directly, let it be done via cpu_has_work
because there might be other conditions that state that c should
be sleeping. */
+ qemu_mutex_lock_iothread();
cpu_interrupt(CPU(c), CPU_INTERRUPT_WAKE);
+ qemu_mutex_unlock_iothread();
}
static inline void mips_vpe_sleep(MIPSCPU *cpu)
--
2.7.4
- [Qemu-devel] [PULL 00/15] MIPS queue for February 14th, 2019, Aleksandar Markovic, 2019/02/14
- [Qemu-devel] [PULL 03/15] hw/mips_int: hold BQL for all interrupt requests, Aleksandar Markovic, 2019/02/14
- [Qemu-devel] [PULL 01/15] target/mips: compare virtual addresses in LL/SC sequence, Aleksandar Markovic, 2019/02/14
- [Qemu-devel] [PULL 02/15] target/mips: reimplement SC instruction emulation and use cmpxchg, Aleksandar Markovic, 2019/02/14
- [Qemu-devel] [PULL 04/15] target/mips: hold BQL in mips_vpe_wake(),
Aleksandar Markovic <=
- [Qemu-devel] [PULL 06/15] target/mips: introduce MTTCG-enabled builds, Aleksandar Markovic, 2019/02/14
- [Qemu-devel] [PULL 07/15] tests/tcg: target/mips: Remove an unnecessary file, Aleksandar Markovic, 2019/02/14
- [Qemu-devel] [PULL 09/15] tests/tcg: target/mips: Add a header with test utilities, Aleksandar Markovic, 2019/02/14
- [Qemu-devel] [PULL 08/15] tests/tcg: target/mips: Add a header with test inputs, Aleksandar Markovic, 2019/02/14
- [Qemu-devel] [PULL 14/15] tests/tcg: target/mips: Add wrappers for MSA logic instructions, Aleksandar Markovic, 2019/02/14
- [Qemu-devel] [PULL 11/15] tests/tcg: target/mips: Add tests for MSA bit counting instructions, Aleksandar Markovic, 2019/02/14
- [Qemu-devel] [PULL 10/15] tests/tcg: target/mips: Add wrappers for MSA bit counting instructions, Aleksandar Markovic, 2019/02/14
- [Qemu-devel] [PULL 05/15] hw/mips_cpc: kick a VP when putting it into Run statewq, Aleksandar Markovic, 2019/02/14
- [Qemu-devel] [PULL 12/15] tests/tcg: target/mips: Add wrappers for MSA interleave instructions, Aleksandar Markovic, 2019/02/14
- [Qemu-devel] [PULL 15/15] tests/tcg: target/mips: Add tests for MSA logic instructions, Aleksandar Markovic, 2019/02/14