qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PULL 0/1] tcg patch queue
@ 2017-09-25 22:16 Richard Henderson
  2017-09-25 22:16 ` [Qemu-devel] [PULL 1/1] accel/tcg/cputlb: avoid recursive BQL (fixes #1706296) Richard Henderson
  2017-09-26 18:47 ` [Qemu-devel] [PULL 0/1] tcg patch queue Peter Maydell
  0 siblings, 2 replies; 3+ messages in thread
From: Richard Henderson @ 2017-09-25 22:16 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell

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(-)

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Qemu-devel] [PULL 1/1] accel/tcg/cputlb: avoid recursive BQL (fixes #1706296)
  2017-09-25 22:16 [Qemu-devel] [PULL 0/1] tcg patch queue Richard Henderson
@ 2017-09-25 22:16 ` Richard Henderson
  2017-09-26 18:47 ` [Qemu-devel] [PULL 0/1] tcg patch queue Peter Maydell
  1 sibling, 0 replies; 3+ messages in thread
From: Richard Henderson @ 2017-09-25 22:16 UTC (permalink / raw)
  To: qemu-devel
  Cc: peter.maydell, Alex Bennée, Richard Jones, Paolo Bonzini,
	qemu-stable

From: Alex Bennée <alex.bennee@linaro.org>

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.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
CC: Richard Jones <rjones@redhat.com>
CC: Paolo Bonzini <bonzini@gnu.org>
CC: qemu-stable@nongnu.org
Message-Id: <20170921110625.9500-1-alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 accel/tcg/cputlb.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c
index e72415a882..bcbcc4db6c 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;
     }
-- 
2.13.5

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PULL 0/1] tcg patch queue
  2017-09-25 22:16 [Qemu-devel] [PULL 0/1] tcg patch queue Richard Henderson
  2017-09-25 22:16 ` [Qemu-devel] [PULL 1/1] accel/tcg/cputlb: avoid recursive BQL (fixes #1706296) Richard Henderson
@ 2017-09-26 18:47 ` Peter Maydell
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Maydell @ 2017-09-26 18:47 UTC (permalink / raw)
  To: Richard Henderson; +Cc: QEMU Developers

On 25 September 2017 at 23:16, Richard Henderson
<richard.henderson@linaro.org> wrote:
> 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)

Applied, thanks.

-- PMM

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-09-26 18:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-25 22:16 [Qemu-devel] [PULL 0/1] tcg patch queue Richard Henderson
2017-09-25 22:16 ` [Qemu-devel] [PULL 1/1] accel/tcg/cputlb: avoid recursive BQL (fixes #1706296) Richard Henderson
2017-09-26 18:47 ` [Qemu-devel] [PULL 0/1] tcg patch queue Peter Maydell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).