aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2017-09-26 19:08:49 +0100
committerPeter Maydell <peter.maydell@linaro.org>2017-09-26 19:08:49 +0100
commit2509dda283d438970028864dd89871bfe0263c3a (patch)
tree200bb00bfe078e5c6e1a606d4996d1d99ec5f1e9
parent2b521a654cbe6ac602696e20db0ff4e65b61b670 (diff)
parent8b81253332b5a3f3c67b6462f39caef47a00dd29 (diff)
downloadqemu-2509dda283d438970028864dd89871bfe0263c3a.zip
qemu-2509dda283d438970028864dd89871bfe0263c3a.tar.gz
qemu-2509dda283d438970028864dd89871bfe0263c3a.tar.bz2
Merge remote-tracking branch 'remotes/rth/tags/pull-tcg-20170925' into staging
BQL bug fix # gpg: Signature made Mon 25 Sep 2017 23:14:48 BST # gpg: using RSA key 0x64DF38E8AF7E215F # gpg: Good signature from "Richard Henderson <richard.henderson@linaro.org>" # gpg: WARNING: This key is not certified with sufficiently trusted signatures! # gpg: It is not certain that the signature belongs to the owner. # Primary key fingerprint: 7A48 1E78 868B 4DB6 A85A 05C0 64DF 38E8 AF7E 215F * remotes/rth/tags/pull-tcg-20170925: accel/tcg/cputlb: avoid recursive BQL (fixes #1706296) Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r--accel/tcg/cputlb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c
index e72415a..bcbcc4d 100644
--- a/accel/tcg/cputlb.c
+++ b/accel/tcg/cputlb.c
@@ -765,7 +765,7 @@ static uint64_t io_readx(CPUArchState *env, CPUIOTLBEntry *iotlbentry,
cpu->mem_io_vaddr = addr;
- if (mr->global_locking) {
+ if (mr->global_locking && !qemu_mutex_iothread_locked()) {
qemu_mutex_lock_iothread();
locked = true;
}
@@ -800,7 +800,7 @@ static void io_writex(CPUArchState *env, CPUIOTLBEntry *iotlbentry,
cpu->mem_io_vaddr = addr;
cpu->mem_io_pc = retaddr;
- if (mr->global_locking) {
+ if (mr->global_locking && !qemu_mutex_iothread_locked()) {
qemu_mutex_lock_iothread();
locked = true;
}