qemu/accel
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
..
hvf hvf: Simplify post reset/init/loadvm hooks 2021-06-03 16:43:27 +01:00
kvm KVM: Fix dirty ring mmap incorrect size due to renaming accident 2021-06-25 10:54:12 +02:00
qtest accel: build qtest modular 2021-07-09 18:21:33 +02:00
stubs Do not include cpu.h if it's not really necessary 2021-05-02 17:24:51 +02:00
tcg 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
xen sysemu: Let VMChangeStateHandler take boolean 'running' argument 2021-03-09 23:13:57 +01:00
accel-common.c accel: autoload modules 2021-07-09 18:21:33 +02:00
accel-softmmu.c accel: autoload modules 2021-07-09 18:21:33 +02:00
accel-softmmu.h accel: replace struct CpusAccel with AccelOpsClass 2021-02-05 10:24:15 -10:00
accel-user.c accel: extend AccelState and AccelClass to user-mode 2021-02-05 10:24:15 -10:00
dummy-cpus.c accel: move qtest CpusAccel functions to a common location 2020-10-24 07:23:19 +02:00
Kconfig Add NVMM accelerator: configure and build logic 2021-05-04 14:15:34 +02:00
meson.build hvf: Move assert_hvf_ok() into common directory 2021-06-03 16:43:26 +01:00