qemu/accel/tcg
Pierrick Bouvier b56f7dd203 plugins: fix qemu_plugin_reset
34e5e1 refactored the plugin context initialization. After this change,
tcg_ctx->plugin_insn is not reset inconditionnally anymore, but only if
one plugin at least is active.

When uninstalling the last plugin active, we stopped reinitializing
tcg_ctx->plugin_insn, which leads to memory callbacks being emitted.
This results in an error as they don't appear in a plugin op sequence as
expected.

The correct fix is to make sure we reset plugin translation variables
after current block translation ends. This way, we can catch any
potential misuse of those after a given block, in more than fixing the
current bug.

Fixes: https://gitlab.com/qemu-project/qemu/-/issues/2570
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Tested-by: Robbin Ehn <rehn@rivosinc.com>
Message-Id: <20241015003819.984601-1-pierrick.bouvier@linaro.org>
[AJB: trim patch version details from commit msg]
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20241023113406.1284676-19-alex.bennee@linaro.org>
2024-10-24 10:04:09 +01:00
..
atomic_common.c.inc plugins: save value during memory accesses 2024-09-19 15:58:01 +01:00
atomic_template.h plugins: save value during memory accesses 2024-09-19 15:58:01 +01: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 accel/tcg: Move {set,clear}_helper_retaddr to cpu_ldst.h 2024-07-23 10:56:04 +10:00
cputlb.c accel/tcg: Use the alignment test in tlb_fill_align 2024-10-13 11:27:05 -07:00
icount-common.c accel/tcg/icount-common: Consolidate the use of warn_report_once() 2024-04-23 17:35:26 +02:00
internal-common.h accel/tcg: Move common declarations to 'internal-common.h' 2024-06-04 10:02:39 +02:00
internal-target.h accel/tcg: Move common declarations to 'internal-common.h' 2024-06-04 10:02:39 +02:00
ldst_atomicity.c.inc accel/tcg: add tracepoints for cpu_loop_exit_atomic 2024-10-24 09:56:26 +01:00
ldst_common.c.inc plugins: save value during memory accesses 2024-09-19 15:58:01 +01: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 plugins: fix qemu_plugin_reset 2024-10-24 10:04:09 +01: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 tcg: remove CPU* types from typedefs.h 2024-05-03 15:47:48 +02:00
tb-maint.c accel/tcg: Fix typo causing tb->page_addr[1] to not be recorded 2024-06-19 13:50:08 -07: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 cpu: move Qemu[Thread|Cond] setup into common code 2024-06-04 10:02:39 +02: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: Remove dead code from rr_cpu_thread_fn() 2024-09-05 13:12:36 +01: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 gdbstub: move enums into separate header 2024-06-24 10:14:17 +01: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 accel/tcg: Move common declarations to 'internal-common.h' 2024-06-04 10:02:39 +02: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: add tracepoints for cpu_loop_exit_atomic 2024-10-24 09:56:26 +01: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: Move user definition of cpu_interrupt() to user-exec.c 2024-05-06 11:21:05 +02:00
translator.c tcg: remove singlestep_enabled from DisasContextBase 2024-10-13 10:04:29 -07:00
user-exec-stub.c accel: Introduce cpu_exec_reset_hold() 2023-11-07 12:13:27 +01:00
user-exec.c accel/tcg: add tracepoints for cpu_loop_exit_atomic 2024-10-24 09:56:26 +01:00
vcpu-state.h user: Declare get_task_state() once in 'accel/tcg/vcpu-state.h' 2024-05-06 14:13:45 +02:00
watchpoint.c system/watchpoint: Move TCG specific code to accel/tcg/ 2024-01-19 12:28:59 +01:00