]> git.proxmox.com Git - mirror_qemu.git/commit
tcg: Make tb_flush() thread safe
authorSergey Fedorov <serge.fdrv@gmail.com>
Tue, 2 Aug 2016 17:27:43 +0000 (18:27 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 27 Sep 2016 09:57:30 +0000 (11:57 +0200)
commit3359baad36889b83df40b637ed993a4b816c4906
tree534ac1be2e5bd5466404bb34ac2b7d52e89a0215
parent53f5ed95064fe6807890cd5535445a05d3361bd2
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>
cpu-exec.c
include/exec/tb-context.h
include/qom/cpu.h
translate-all.c