qemu-e2k/accel/tcg
Richard Henderson dcd092a063 accel/tcg: Improve can_do_io management
We already attempted to set and clear can_do_io before the first
and last insns, but only used the initial value of max_insns and
the call to translator_io_start to find those insns.

Now that we track insn_start in DisasContextBase, and now that
we have emit_before_op, we can wait until we have finished
translation to identify the true first and last insns and emit
the sets of can_do_io at that time.

This fixes the case of a translation block which crossed a page
boundary, and for which the second page turned out to be mmio.
In this case we truncate the block, and the previous logic for
can_do_io could leave a block with a single insn with can_do_io
set to false, which would fail an assertion in cpu_io_recompile.

Reported-by: Jørgen Hansen <Jorgen.Hansen@wdc.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Tested-by: Jørgen Hansen <Jorgen.Hansen@wdc.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2024-04-09 07:45:10 -10:00
..
atomic_common.c.inc tcg: Use HAVE_CMPXCHG128 instead of CONFIG_CMPXCHG128 2023-07-15 08:02:49 +01:00
atomic_template.h accel/tcg: Modify atomic_mmu_lookup() to use CPUState 2023-10-04 11:03:54 -07:00
cpu-exec-common.c accel/tcg: Make cpu-exec-common.c a target agnostic unit 2023-10-04 11:03:54 -07:00
cpu-exec.c bulk: Call in place single use cpu_env() 2024-03-12 11:46:16 +01:00
cputlb.c accel/tcg: Add TLB_CHECK_ALIGNED 2024-03-05 13:22:56 +00:00
icount-common.c util/async: Only call icount_notify_exit() if icount is enabled 2024-01-19 12:28:59 +01:00
internal-common.h accel/tcg: Move HMP info jit and info opcount code 2023-11-06 08:27:21 -08:00
internal-target.h accel/tcg: Make cpu-exec-common.c a target agnostic unit 2023-10-04 11:03:54 -07:00
ldst_atomicity.c.inc accel/tcg: correct typos 2024-02-20 22:21:18 +03:00
ldst_common.c.inc include/exec: Change cpu_mmu_index argument to CPUState 2024-02-03 16:46:10 +10:00
meson.build accel/tcg: Rename tcg_ss[] -> tcg_specific_ss[] in meson 2024-01-29 21:04:10 +10:00
monitor.c accel/tcg: Move HMP info jit and info opcount code 2023-11-06 08:27:21 -08:00
plugin-gen.c accel/tcg/plugin: Remove CONFIG_SOFTMMU_GATE definition 2024-04-02 14:54:35 +02:00
plugin-helpers.h plugins: Use different helpers when reading registers 2024-02-28 09:11:42 +00:00
tb-context.h tcg: Move tb_phys_invalidate_count to tb_ctx 2021-07-09 09:38:33 -07:00
tb-hash.h accel/tcg: Widen pc to vaddr in CPUJumpCache 2023-06-26 17:32:59 +02:00
tb-jmp-cache.h cpu-exec: simplify jump cache management 2024-01-29 07:06:03 +10:00
tb-maint.c accel/tcg: Remove tb_invalidate_phys_page() from system emulation 2024-01-19 12:28:59 +01:00
tcg-accel-ops-icount.c Replace "iothread lock" with "BQL" in comments 2024-01-08 10:45:43 -05:00
tcg-accel-ops-icount.h accel/tcg/tcg-accel-ops-rr: ensure fairness with icount 2023-05-11 09:53:41 +01:00
tcg-accel-ops-mttcg.c accel/tcg: Rename tcg_cpus_exec() -> tcg_cpu_exec() 2024-01-29 21:04:10 +10:00
tcg-accel-ops-mttcg.h Clean up header guards that don't match their file name 2022-05-11 16:49:06 +02:00
tcg-accel-ops-rr.c accel/tcg: Rename tcg_cpus_exec() -> tcg_cpu_exec() 2024-01-29 21:04:10 +10:00
tcg-accel-ops-rr.h Clean up header guards that don't match their file name 2022-05-11 16:49:06 +02:00
tcg-accel-ops.c accel/tcg: Rename tcg_cpus_exec() -> tcg_cpu_exec() 2024-01-29 21:04:10 +10:00
tcg-accel-ops.h accel/tcg: Rename tcg_cpus_exec() -> tcg_cpu_exec() 2024-01-29 21:04:10 +10:00
tcg-all.c tcg: Split out tcg init functions to tcg/startup.h 2023-10-04 11:03:54 -07:00
tcg-runtime-gvec.c tcg: Add gvec compare with immediate and scalar operand 2023-09-16 14:57:15 +00:00
tcg-runtime.c tcg: Split helper-proto.h 2023-06-05 12:04:29 -07:00
tcg-runtime.h tcg: Add gvec compare with immediate and scalar operand 2023-09-16 14:57:15 +00:00
trace-events accel/tcg: Remove trace events from trace-root.h 2022-12-20 17:11:12 -08:00
trace.h trace: switch position of headers to what Meson requires 2020-08-21 06:18:24 -04:00
translate-all.c accel/tcg: Use CPUState.get_pc in cpu_io_recompile 2024-03-29 12:16:00 -10:00
translator.c accel/tcg: Improve can_do_io management 2024-04-09 07:45:10 -10:00
user-exec-stub.c accel: Introduce cpu_exec_reset_hold() 2023-11-07 12:13:27 +01:00
user-exec.c accel/tcg: Disconnect TargetPageDataNode from page size 2024-02-29 11:35:37 -10:00
watchpoint.c system/watchpoint: Move TCG specific code to accel/tcg/ 2024-01-19 12:28:59 +01:00