408b2b3d9d
The TCGCPUOps::cpu_exec_halt method is called from cpu_handle_halt() when the CPU is halted, so that a target CPU emulation can do anything target-specific it needs to do. (At the moment we only use this on i386.) The current specification of the method doesn't allow the target specific code to do something different if the CPU is about to come out of the halt state, because cpu_handle_halt() only determines this after the method has returned. (If the method called cpu_has_work() itself this would introduce a potential race if an interrupt arrived between the target's method implementation checking and cpu_handle_halt() repeating the check.) Change the definition of the method so that it returns a bool to tell cpu_handle_halt() whether to stay in halt or not. We will want this for the Arm target, where FEAT_WFxT wants to do some work only for the case where the CPU is in halt but about to leave it. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20240430140035.3889879-2-peter.maydell@linaro.org |
||
---|---|---|
.. | ||
hvf | ||
kvm | ||
nvmm | ||
tcg | ||
whpx | ||
arch_dump.c | ||
arch_memory_mapping.c | ||
confidential-guest.c | ||
confidential-guest.h | ||
cpu-apic.c | ||
cpu-dump.c | ||
cpu-internal.h | ||
cpu-param.h | ||
cpu-qom.h | ||
cpu-sysemu.c | ||
cpu.c | ||
cpu.h | ||
gdbstub.c | ||
helper.c | ||
helper.h | ||
host-cpu.c | ||
host-cpu.h | ||
Kconfig | ||
machine.c | ||
meson.build | ||
monitor.c | ||
ops_sse.h | ||
sev-sysemu-stub.c | ||
sev.c | ||
sev.h | ||
svm.h | ||
trace-events | ||
trace.h | ||
xsave_helper.c |