Skip to contentSkip to conversation

tcg patch queue

GIT PULL Applied Richard Henderson 2 participants 3 messages Sep 25, 2017 – Sep 26, 2017

lore
Share & tools
lore
#0 lore raw

Just one patch, but should make stable 2.10.1 this week.

r~

The following changes since commit 460b6c8e581aa06b86f59eebd9e52edfe7adf417:

Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging (2017-09-23 12:55:40 +0100)

are available in the git repository at:

git://github.com/rth7680/qemu.git tags/pull-tcg-20170925

for you to fetch changes up to 8b81253332b5a3f3c67b6462f39caef47a00dd29:

accel/tcg/cputlb: avoid recursive BQL (fixes #1706296) (2017-09-25 11:23:30 -0700)

----------------------------------------------------------------
BQL bug fix

----------------------------------------------------------------
Alex Bennée (1):
accel/tcg/cputlb: avoid recursive BQL (fixes #1706296)

 accel/tcg/cputlb.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
#1 lore raw

[Qemu-devel] [PULL 1/1] accel/tcg/cputlb: avoid recursive BQL (fixes #1706296)

From: Alex Bennée <[email protected]>

The mmio path (see exec.c:prepare_mmio_access) already protects itself against recursive locking and it makes sense to do the same for io_readx/writex. Otherwise any helper running in the BQL context will assert when it attempts to write to device memory as in the case of the bug report.

Message-Id: <[email protected]>

---
 accel/tcg/cputlb.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
accel/tcg/cputlb.c +2 -2
index e72415a882..bcbcc4db6c 100644
@@ -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;
     }
Signature · 1 line
2.13.5
#2 lore raw
In reply to Richard Henderson
Quoted 16 lines · Richard Henderson

Just one patch, but should make stable 2.10.1 this week.

r~

The following changes since commit 460b6c8e581aa06b86f59eebd9e52edfe7adf417:

Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging (2017-09-23 12:55:40 +0100)

are available in the git repository at:

git://github.com/rth7680/qemu.git tags/pull-tcg-20170925

for you to fetch changes up to 8b81253332b5a3f3c67b6462f39caef47a00dd29:

Quoted 8 lines

accel/tcg/cputlb: avoid recursive BQL (fixes #1706296) (2017-09-25 11:23:30 -0700)

----------------------------------------------------------------
BQL bug fix

----------------------------------------------------------------
Alex Bennée (1):
accel/tcg/cputlb: avoid recursive BQL (fixes #1706296)

Applied, thanks.

-- PMM