aboutsummaryrefslogtreecommitdiff
path: root/vl.c
diff options
context:
space:
mode:
authorAlex Bennée <alex.bennee@linaro.org>2018-02-27 12:52:48 +0300
committerPaolo Bonzini <pbonzini@redhat.com>2018-03-12 17:10:36 +0100
commitd759c951f3287fad04210a52f2dc93f94cf58c7f (patch)
tree5af67500a854ba2e25bc7690bf346bf3c2bbb810 /vl.c
parent1a423896fa4fc2ea49c64e7a493d88a8b251950d (diff)
downloadqemu-d759c951f3287fad04210a52f2dc93f94cf58c7f.zip
qemu-d759c951f3287fad04210a52f2dc93f94cf58c7f.tar.gz
qemu-d759c951f3287fad04210a52f2dc93f94cf58c7f.tar.bz2
replay: push replay_mutex_lock up the call tree
Now instead of using the replay_lock to guard the output of the log we now use it to protect the whole execution section. This replaces what the BQL used to do when it was held during TCG execution. We also introduce some rules for locking order - mainly that you cannot take the replay_mutex while holding the BQL. This leads to some slight sophistry during start-up and extending the replay_mutex_destroy function to unlock the mutex without checking for the BQL condition so it can be cleanly dropped in the non-replay case. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru> Tested-by: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru> Message-Id: <20180227095248.1060.40374.stgit@pasha-VirtualBox> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Diffstat (limited to 'vl.c')
-rw-r--r--vl.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/vl.c b/vl.c
index e811524..5925a4b 100644
--- a/vl.c
+++ b/vl.c
@@ -3058,6 +3058,7 @@ int main(int argc, char **argv, char **envp)
qemu_init_cpu_list();
qemu_init_cpu_loop();
+
qemu_mutex_lock_iothread();
atexit(qemu_run_exit_notifiers);