qemu/accel/tcg
Emilio Cota 3fd62e73ad plugins: fix optimization in plugin_gen_disable_mem_helpers
We were mistakenly checking tcg_ctx->plugin_insn as a canary to know
whether the TB had emitted helpers that might have accessed memory.

The problem is that tcg_ctx->plugin_insn gets updated on every
instruction in the TB, which results in us wrongly performing the
optimization (i.e. not clearing cpu->plugin_mem_cbs) way too often,
since it's not rare that the last instruction in the TB doesn't
use helpers.

Fix it by tracking a per-TB canary.

While at it, expand documentation.

Related: #1381

Signed-off-by: Emilio Cota <cota@braap.org>
Message-Id: <20230108164731.61469-2-cota@braap.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20230124180127.1881110-32-alex.bennee@linaro.org>
2023-02-02 11:48:20 +00:00
..
atomic_common.c.inc tracing: remove TCG memory access tracing 2022-02-09 12:08:42 +00:00
atomic_template.h Replace config-time define HOST_WORDS_BIGENDIAN 2022-04-06 10:50:37 +02:00
cpu-exec-common.c accel/tcg: Remove will_exit argument from cpu_restore_state 2022-11-01 08:31:41 +11:00
cpu-exec.c cpu: free cpu->tb_jmp_cache with RCU 2023-02-02 11:48:20 +00:00
cputlb.c bulk: Rename TARGET_FMT_plx -> HWADDR_FMT_plx 2023-01-18 11:14:34 +01:00
debuginfo.c accel/tcg: Add debuginfo support 2023-01-16 10:14:12 -10:00
debuginfo.h coroutine: Split qemu/coroutine-core.h off qemu/coroutine.h 2023-01-20 07:21:46 +01:00
hmp.c Don't include sysemu/tcg.h if it is not necessary 2022-04-20 12:12:47 -07:00
internal.h accel/tcg: Restrict page_collection structure to system TB maintainance 2022-12-20 17:11:12 -08:00
ldst_common.c.inc exec/memop: Adding signedness to quad definitions 2022-01-08 15:46:10 +10:00
meson.build tcg: add perfmap and jitdump 2023-01-16 10:14:12 -10:00
perf.c tcg: add perfmap and jitdump 2023-01-16 10:14:12 -10:00
perf.h tcg: add perfmap and jitdump 2023-01-16 10:14:12 -10:00
plugin-gen.c plugins: fix optimization in plugin_gen_disable_mem_helpers 2023-02-02 11:48:20 +00:00
plugin-helpers.h accel/tcg: Add tcg call flags to plugins helpers 2021-06-19 08:51:11 -07:00
tb-context.h tcg: Move tb_phys_invalidate_count to tb_ctx 2021-07-09 09:38:33 -07:00
tb-hash.h include/hw/core: Create struct CPUJumpCache 2022-10-04 12:13:12 -07:00
tb-jmp-cache.h cpu: free cpu->tb_jmp_cache with RCU 2023-02-02 11:48:20 +00:00
tb-maint.c accel/tcg: Fix tb_invalidate_phys_page_unwind 2023-01-05 11:41:29 -08:00
tcg-accel-ops-icount.c icount: Take iothread lock when running QEMU timers 2022-08-09 10:55:14 +01:00
tcg-accel-ops-icount.h Clean up header guards that don't match their file name 2022-05-11 16:49:06 +02:00
tcg-accel-ops-mttcg.c Revert "accel/tcg: Init TCG cflags in vCPU thread handler" 2022-10-25 22:01:14 +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 Revert incorrect cflags initialization. 2022-10-26 10:53:41 -04: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 guest debug support check to ops 2022-10-06 11:53:41 +01:00
tcg-accel-ops.h Clean up header guards that don't match their file name 2022-05-11 16:49:06 +02:00
tcg-all.c gdbstub: move sstep flags probing into AccelClass 2022-10-06 11:53:41 +01:00
tcg-runtime-gvec.c accel/tcg: Use add/sub overflow routines in tcg-runtime-gvec.c 2021-05-16 07:13:51 -05:00
tcg-runtime.c accel/tcg: Move helper_lookup_tb_ptr to cpu-exec.c 2021-07-09 20:23:06 -07:00
tcg-runtime.h accel/tcg: Standardize atomic helpers on softmmu api 2021-07-21 07:45:38 -10: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 tcg: Add gen_tb to TCGContext 2023-01-17 10:08:51 -10:00
translator.c accel/tcg: Introduce tb_{set_}page_addr{0,1} 2022-10-26 11:11:28 +10:00
user-exec-stub.c Do not include sysemu/sysemu.h if it's not really necessary 2021-05-02 17:24:50 +02:00
user-exec.c accel/tcg: Handle false negative lookup in page_check_range 2023-01-05 11:41:29 -08:00