qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH for-9.0? 0/9] accel/tcg: Fix can_do_io vs 2nd page mmio
@ 2024-04-06 22:32 Richard Henderson
  2024-04-06 22:32 ` [PATCH 1/9] tcg: Add TCGContext.emit_before_op Richard Henderson
                   ` (8 more replies)
  0 siblings, 9 replies; 22+ messages in thread
From: Richard Henderson @ 2024-04-06 22:32 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, Jorgen.Hansen, Jonathan.Cameron, linux-cxl

Bug report is
https://lore.kernel.org/qemu-devel/33748BB7-E617-4661-BDE3-5D29780FC9FF@wdc.com

Jørgen properly identified the problem, though calling set_can_do_io
in the middle of translator_access is incorrect.

It forced me to do something that's been in the back of my mind for
a while and track the insns being emitted so that we can go back and
insert the proper store to can_do_io after code for the final insn
has been emitted.

If we decide to take this for 9.0, most of the target changes could
technically be left for 9.1.  With the exception of i386 and its funky
case of "pretend we never started translating the current insn".
But I think the target changes are minor enough to take them anyway.


r~


Richard Henderson (9):
  tcg: Add TCGContext.emit_before_op
  accel/tcg: Add insn_start to DisasContextBase
  target/arm: Use insn_start from DisasContextBase
  target/hppa: Use insn_start from DisasContextBase
  target/i386: Preserve DisasContextBase.insn_start across rewind
  target/microblaze: Use insn_start from DisasContextBase
  target/riscv: Use insn_start from DisasContextBase
  target/s390x: Use insn_start from DisasContextBase
  accel/tcg: Improve can_do_io management

 include/exec/translator.h      |  4 ++-
 include/tcg/tcg.h              |  6 +++++
 target/arm/tcg/translate.h     | 12 ++++-----
 accel/tcg/translator.c         | 47 ++++++++++++++++++----------------
 target/arm/tcg/translate-a64.c |  2 +-
 target/arm/tcg/translate.c     |  2 +-
 target/hppa/translate.c        | 10 ++++----
 target/i386/tcg/translate.c    |  3 +++
 target/microblaze/translate.c  |  8 ++----
 target/riscv/translate.c       | 11 ++++----
 target/s390x/tcg/translate.c   |  4 +--
 tcg/tcg.c                      | 14 ++++++++--
 12 files changed, 70 insertions(+), 53 deletions(-)

-- 
2.34.1



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

end of thread, other threads:[~2024-04-09 23:09 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-06 22:32 [PATCH for-9.0? 0/9] accel/tcg: Fix can_do_io vs 2nd page mmio Richard Henderson
2024-04-06 22:32 ` [PATCH 1/9] tcg: Add TCGContext.emit_before_op Richard Henderson
2024-04-08  6:13   ` Philippe Mathieu-Daudé
2024-04-06 22:32 ` [PATCH 2/9] accel/tcg: Add insn_start to DisasContextBase Richard Henderson
2024-04-08  6:18   ` Philippe Mathieu-Daudé
2024-04-06 22:32 ` [PATCH 3/9] target/arm: Use insn_start from DisasContextBase Richard Henderson
2024-04-08  6:16   ` Philippe Mathieu-Daudé
2024-04-06 22:32 ` [PATCH 4/9] target/hppa: " Richard Henderson
2024-04-08  6:17   ` Philippe Mathieu-Daudé
2024-04-06 22:32 ` [PATCH 5/9] target/i386: Preserve DisasContextBase.insn_start across rewind Richard Henderson
2024-04-09 15:23   ` Philippe Mathieu-Daudé
2024-04-09 15:28     ` Philippe Mathieu-Daudé
2024-04-06 22:32 ` [PATCH 6/9] target/microblaze: Use insn_start from DisasContextBase Richard Henderson
2024-04-08  6:17   ` Philippe Mathieu-Daudé
2024-04-06 22:32 ` [PATCH 7/9] target/riscv: " Richard Henderson
2024-04-08  6:17   ` Philippe Mathieu-Daudé
2024-04-06 22:32 ` [PATCH 8/9] target/s390x: " Richard Henderson
2024-04-08  6:18   ` Philippe Mathieu-Daudé
2024-04-06 22:32 ` [PATCH 9/9] accel/tcg: Improve can_do_io management Richard Henderson
2024-04-08  6:25   ` Philippe Mathieu-Daudé
2024-04-08 13:13   ` Jørgen Hansen
2024-04-09 23:03   ` Gregory Price

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