aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2010-01-15 09:42:07 +0100
committerAnthony Liguori <aliguori@us.ibm.com>2010-01-19 16:31:03 -0600
commit1c3569fe4e4e3783b7813f450fa699d3f552e44f (patch)
treeccd7067e4de218a989cb42a4dfec53f9d762c5f7 /cpu-exec.c
parentfix wrong indentation (diff)
downloadqemu-kvm-1c3569fe4e4e3783b7813f450fa699d3f552e44f.tar.gz
qemu-kvm-1c3569fe4e4e3783b7813f450fa699d3f552e44f.tar.bz2
qemu-kvm-1c3569fe4e4e3783b7813f450fa699d3f552e44f.zip
clean up env->current_tb
There are three paths from the innermost while loop of cpu_exec to the top of the outermost for loop. Two do not reset env->current_tb. Fix this. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'cpu-exec.c')
-rw-r--r--cpu-exec.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/cpu-exec.c b/cpu-exec.c
index 2f119a941..2b3e6989e 100644
--- a/cpu-exec.c
+++ b/cpu-exec.c
@@ -56,6 +56,7 @@ int qemu_cpu_has_work(CPUState *env)
void cpu_loop_exit(void)
{
+ env->current_tb = NULL;
longjmp(env->jmp_env, 1);
}
@@ -107,6 +108,7 @@ static void cpu_exec_nocache(int max_cycles, TranslationBlock *orig_tb)
env->current_tb = tb;
/* execute the generated code */
next_tb = tcg_qemu_tb_exec(tb->tc_ptr);
+ env->current_tb = NULL;
if ((next_tb & 3) == 2) {
/* Restore PC. This may happen if async event occurs before