]> Git Repo - qemu.git/blobdiff - qom/cpu.c
cpu_common_reset: wrap TCG specific code in tcg_enabled()
[qemu.git] / qom / cpu.c
index 03d9190f8ce8eb60ed81a1e748869f9e82164955..61ee0cb88c42464dc94be9cf495da779e0aa0971 100644 (file)
--- a/qom/cpu.c
+++ b/qom/cpu.c
@@ -270,8 +270,14 @@ static void cpu_common_reset(CPUState *cpu)
     cpu->exception_index = -1;
     cpu->crash_occurred = false;
 
-    for (i = 0; i < TB_JMP_CACHE_SIZE; ++i) {
-        atomic_set(&cpu->tb_jmp_cache[i], NULL);
+    if (tcg_enabled()) {
+        for (i = 0; i < TB_JMP_CACHE_SIZE; ++i) {
+            atomic_set(&cpu->tb_jmp_cache[i], NULL);
+        }
+
+#ifdef CONFIG_SOFTMMU
+        tlb_flush(cpu, 0);
+#endif
     }
 }
 
This page took 0.022337 seconds and 4 git commands to generate.