@@ -2225,3 +2225,11 @@ int page_unprotect(target_ulong address, uintptr_t pc)
return 0;
}
#endif /* CONFIG_USER_ONLY */
+
+/* This is a wrapper for common code that can not use CONFIG_SOFTMMU */
+void tcg_flush_softmmu_tlb(CPUState *cs)
+{
+#ifdef CONFIG_SOFTMMU
+ tlb_flush(cs);
+#endif
+}
@@ -28,6 +28,8 @@ void qemu_init_cpu_list(void);
void cpu_list_lock(void);
void cpu_list_unlock(void);
+void tcg_flush_softmmu_tlb(CPUState *cs);
+
#if !defined(CONFIG_USER_ONLY)
enum device_endian {
@@ -26,6 +26,7 @@
#include "qemu/notify.h"
#include "qemu/log.h"
#include "exec/log.h"
+#include "exec/cpu-common.h"
#include "qemu/error-report.h"
#include "sysemu/sysemu.h"
#include "hw/qdev-properties.h"
@@ -296,9 +297,7 @@ static void cpu_common_reset(CPUState *cpu)
atomic_set(&cpu->tb_jmp_cache[i], NULL);
}
-#ifdef CONFIG_SOFTMMU
- tlb_flush(cpu, 0);
-#endif
+ tcg_flush_softmmu_tlb(cpu);
}
}