aboutsummaryrefslogtreecommitdiff
path: root/include/exec/tb-context.h
diff options
context:
space:
mode:
authorSergey Fedorov <serge.fdrv@gmail.com>2016-08-02 18:27:43 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2016-09-27 11:57:30 +0200
commit3359baad36889b83df40b637ed993a4b816c4906 (patch)
tree534ac1be2e5bd5466404bb34ac2b7d52e89a0215 /include/exec/tb-context.h
parent53f5ed95064fe6807890cd5535445a05d3361bd2 (diff)
tcg: Make tb_flush() thread safe
Use async_safe_run_on_cpu() to make tb_flush() thread safe. This is possible now that code generation does not happen in the middle of execution. It can happen that multiple threads schedule a safe work to flush the translation buffer. To keep statistics and debugging output sane, always check if the translation buffer has already been flushed. Signed-off-by: Sergey Fedorov <serge.fdrv@gmail.com> Signed-off-by: Sergey Fedorov <sergey.fedorov@linaro.org> [AJB: minor re-base fixes] Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <1470158864-17651-13-git-send-email-alex.bennee@linaro.org> Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include/exec/tb-context.h')
-rw-r--r--include/exec/tb-context.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/exec/tb-context.h b/include/exec/tb-context.h
index dce95d92d6..c7f17f26e0 100644
--- a/include/exec/tb-context.h
+++ b/include/exec/tb-context.h
@@ -38,7 +38,7 @@ struct TBContext {
QemuMutex tb_lock;
/* statistics */
- int tb_flush_count;
+ unsigned tb_flush_count;
int tb_phys_invalidate_count;
};