]> git.proxmox.com Git - mirror_qemu.git/commit - cpus.c
main-loop: use qemu_mutex_lock_iothread consistently
authorPaolo Bonzini <pbonzini@redhat.com>
Thu, 18 Jun 2015 16:47:18 +0000 (18:47 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 1 Jul 2015 13:45:50 +0000 (15:45 +0200)
commit2e7f7a3c86f884a77296a137b7c730a4d580c5c9
treea6b808eefcf024455e90366c9ab77899167db614
parentbdf026317daa3b9dfa281f29e96fbb6fd48394c8
main-loop: use qemu_mutex_lock_iothread consistently

The next patch will require the BQL to be always taken with
qemu_mutex_lock_iothread(), while right now this isn't the case.

Outside TCG mode this is not a problem.  In TCG mode, we need to be
careful and avoid the "prod out of compiled code" step if already
in a VCPU thread.  This is easily done with a check on current_cpu,
i.e. qemu_in_vcpu_thread().

Hopefully, multithreaded TCG will get rid of the whole logic to kick
VCPUs whenever an I/O event occurs!

Cc: Frederic Konrad <fred.konrad@greensocs.com>
Message-Id: <1434646046-27150-2-git-send-email-pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
cpus.c