Bug report is https://lore.kernel.org/qemu-devel/33748bb7-e617-4661-bde3-5d29780fc...@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