@@ -20,3 +20,6 @@
void tb_flush(CPUState *cpu)
{
}
+void tb_flush_sync(CPUState *cpu)
+{
+}
@@ -929,6 +929,13 @@ done:
tb_unlock();
}
+void tb_flush_sync(CPUState *cpu)
+{
+ unsigned tb_flush_count = atomic_mb_read(&tcg_ctx.tb_ctx.tb_flush_count);
+ assert(cpu == current_cpu);
+ do_tb_flush(cpu, RUN_ON_CPU_HOST_INT(tb_flush_count));
+}
+
void tb_flush(CPUState *cpu)
{
if (tcg_enabled()) {
@@ -358,6 +358,7 @@ struct TranslationBlock {
void tb_free(TranslationBlock *tb);
void tb_flush(CPUState *cpu);
+void tb_flush_sync(CPUState *cpu);
void tb_phys_invalidate(TranslationBlock *tb, tb_page_addr_t page_addr);
TranslationBlock *tb_htable_lookup(CPUState *cpu, target_ulong pc,
target_ulong cs_base, uint32_t flags);
Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu> --- accel/stubs/tcg-stub.c | 3 +++ accel/tcg/translate-all.c | 7 +++++++ include/exec/exec-all.h | 1 + 3 files changed, 11 insertions(+)