accel/tcg: Remove will_exit argument from cpu_restore_state

The value passed is always true, and if the target's
synchronize_from_tb hook is non-trivial, not exiting
may be erroneous.

Reviewed-by: Claudio Fontana <cfontana@suse.de>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
Richard Henderson 2022-10-24 23:09:57 +10:00
parent cc30dc441b
commit 3d419a4dd2
17 changed files with 25 additions and 36 deletions

View file

@ -71,7 +71,7 @@ void cpu_loop_exit(CPUState *cpu)
void cpu_loop_exit_restore(CPUState *cpu, uintptr_t pc)
{
if (pc) {
cpu_restore_state(cpu, pc, true);
cpu_restore_state(cpu, pc);
}
cpu_loop_exit(cpu);
}

View file

@ -318,16 +318,8 @@ void cpu_restore_state_from_tb(CPUState *cpu, TranslationBlock *tb,
#endif
}
bool cpu_restore_state(CPUState *cpu, uintptr_t host_pc, bool will_exit)
bool cpu_restore_state(CPUState *cpu, uintptr_t host_pc)
{
/*
* The pc update associated with restore without exit will
* break the relative pc adjustments performed by TARGET_TB_PCREL.
*/
if (TARGET_TB_PCREL) {
assert(will_exit);
}
/*
* The host_pc has to be in the rx region of the code buffer.
* If it is not we will not be able to resolve it here.
@ -341,7 +333,7 @@ bool cpu_restore_state(CPUState *cpu, uintptr_t host_pc, bool will_exit)
if (in_code_gen_buffer((const void *)(host_pc - tcg_splitwx_diff))) {
TranslationBlock *tb = tcg_tb_lookup(host_pc);
if (tb) {
cpu_restore_state_from_tb(cpu, tb, host_pc, will_exit);
cpu_restore_state_from_tb(cpu, tb, host_pc, true);
return true;
}
}