qemu-e2k/accel/tcg
Peter Maydell df3a2de51a accel/tcg: Don't use CF_COUNT_MASK as the max value of icount_decr.u16.low
In cpu_loop_exec_tb() we were bounding the number of insns we might
try to execute in a TB using CF_COUNT_MASK.  This is incorrect,
because we can validly put up to 0xffff into icount_decr.u16.low.  In
particular, since commit 78ff82bb1b reduced CF_COUNT_MASK to
511 this meant that we would incorrectly only try to execute 511
instructions in a 512-instruction TB, which could result in QEMU
hanging when in icount mode.

Use the actual maximum value, which is 0xffff. (This brings this code
in to line with the similar logic in icount_prepare_for_run() in
tcg-accel-ops-icount.c.)

Fixes: 78ff82bb1b
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/499
Message-Id: <20210725174405.24568-2-peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2021-07-26 06:55:53 -10:00
..
atomic_common.c.inc accel/tcg: Push trace info building into atomic_common.c.inc 2021-07-21 07:45:38 -10:00
atomic_template.h accel/tcg: Push trace info building into atomic_common.c.inc 2021-07-21 07:45:38 -10:00
cpu-exec-common.c Do not include cpu.h if it's not really necessary 2021-05-02 17:24:51 +02:00
cpu-exec.c accel/tcg: Don't use CF_COUNT_MASK as the max value of icount_decr.u16.low 2021-07-26 06:55:53 -10:00
cputlb.c accel/tcg: Expand ATOMIC_MMU_LOOKUP_* 2021-07-21 07:45:38 -10:00
hmp.c monitor/tcg: move tcg hmp commands to accel/tcg, register them dynamically 2021-07-09 18:21:33 +02:00
internal.h accel/tcg: Merge tcg_exec_init into tcg_init_machine 2021-06-11 09:26:28 -07:00
meson.build monitor/tcg: move tcg hmp commands to accel/tcg, register them dynamically 2021-07-09 18:21:33 +02:00
plugin-gen.c plugins: Drop tcg_flags from struct qemu_plugin_dyn_cb 2021-06-19 08:51:11 -07: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 accel/tcg: Keep TranslationBlock headers local to TCG 2021-05-26 15:33:59 -07:00
tcg-accel-ops-icount.c Do not include hw/boards.h if it's not really necessary 2021-05-02 17:24:51 +02:00
tcg-accel-ops-icount.h accel: replace struct CpusAccel with AccelOpsClass 2021-02-05 10:24:15 -10:00
tcg-accel-ops-mttcg.c accel/tcg: Precompute curr_cflags into cpu->tcg_cflags 2021-03-06 11:53:57 -08:00
tcg-accel-ops-mttcg.h accel: replace struct CpusAccel with AccelOpsClass 2021-02-05 10:24:15 -10:00
tcg-accel-ops-rr.c Do not include hw/boards.h if it's not really necessary 2021-05-02 17:24:51 +02:00
tcg-accel-ops-rr.h accel: replace struct CpusAccel with AccelOpsClass 2021-02-05 10:24:15 -10:00
tcg-accel-ops.c accel: add tcg module annotations 2021-07-09 18:21:33 +02:00
tcg-accel-ops.h accel/tcg: Precompute curr_cflags into cpu->tcg_cflags 2021-03-06 11:53:57 -08:00
tcg-all.c accel: add tcg module annotations 2021-07-09 18:21:33 +02: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 docs: fix references to docs/devel/tracing.rst 2021-06-02 06:51:09 +02: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: Record singlestep_enabled in tb->cflags 2021-07-21 07:47:05 -10:00
translator.c accel/tcg: Record singlestep_enabled in tb->cflags 2021-07-21 07:47:05 -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: Expand ATOMIC_MMU_LOOKUP_* 2021-07-21 07:45:38 -10:00