summaryrefslogtreecommitdiffstats
path: root/translate-all.c
diff options
context:
space:
mode:
authorPavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru>2014-11-26 13:40:16 +0300
committerPaolo Bonzini <pbonzini@redhat.com>2014-12-15 12:21:02 +0100
commitd8a499f17ee5f05407874f29f69f0e3e3198a853 (patch)
treeb0a5b9acd472944893924e637faa4262fd86f1b5 /translate-all.c
parent2a62914bd8209d97e918f30f0de74bec2bf622c4 (diff)
downloadhqemu-d8a499f17ee5f05407874f29f69f0e3e3198a853.zip
hqemu-d8a499f17ee5f05407874f29f69f0e3e3198a853.tar.gz
cpu-exec: invalidate nocache translation if they are interrupted
In this case, QEMU might longjmp out of cpu-exec.c and miss the final cleanup in cpu_exec_nocache. Do this manually through a new compile flag. Signed-off-by: Pavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'translate-all.c')
-rw-r--r--translate-all.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/translate-all.c b/translate-all.c
index ba5c840..cf05472 100644
--- a/translate-all.c
+++ b/translate-all.c
@@ -264,6 +264,12 @@ bool cpu_restore_state(CPUState *cpu, uintptr_t retaddr)
tb = tb_find_pc(retaddr);
if (tb) {
cpu_restore_state_from_tb(cpu, tb, retaddr);
+ if (tb->cflags & CF_NOCACHE) {
+ /* one-shot translation, invalidate it immediately */
+ cpu->current_tb = NULL;
+ tb_phys_invalidate(tb, -1);
+ tb_free(tb);
+ }
return true;
}
return false;
OpenPOWER on IntegriCloud