@@ -528,17 +528,13 @@ int cpu_exec(CPUState *cpu)
next_tb & TB_EXIT_MASK, tb);
}
tb_unlock();
- /* cpu_interrupt might be called while translating the
- TB, but before it is linked into a potentially
- infinite loop and becomes env->current_tb. Avoid
- starting execution if there is a pending interrupt. */
- cpu->current_tb = tb;
- barrier();
if (likely(!cpu->exit_request)) {
trace_exec_tb(tb, tb->pc);
tc_ptr = tb->tc_ptr;
/* execute the generated code */
+ cpu->current_tb = tb;
next_tb = cpu_tb_exec(cpu, tc_ptr);
+ cpu->current_tb = NULL;
switch (next_tb & TB_EXIT_MASK) {
case TB_EXIT_REQUESTED:
/* Something asked us to stop executing
@@ -581,7 +577,6 @@ int cpu_exec(CPUState *cpu)
break;
}
}
- cpu->current_tb = NULL;
/* Try to align the host and virtual clocks
if the guest is in advance */
align_clocks(&sc, cpu);
TCG has not been reading cpu->current_tb from signal handlers for years. The code that synchronized cpu_exec with the signal handler is not needed anymore. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> --- cpu-exec.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-)