]> git.ipfire.org Git - thirdparty/qemu.git/commit
cpus: unify qemu_*_wait_io_event
authorPaolo Bonzini <pbonzini@redhat.com>
Thu, 11 Jan 2018 12:53:12 +0000 (13:53 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 16 Jan 2018 13:54:51 +0000 (14:54 +0100)
commitdb08b687cdd5319286665aabd34f82665630416f
treee93ceecd86e566043dc06fd7c7e1be9a99fc8aae
parentb39e3f34c9de7ead6a11a74aa2de78baf41d81a7
cpus: unify qemu_*_wait_io_event

Except for round-robin TCG, every other accelerator is using more or
less the same code around qemu_wait_io_event_common.  The exception
is HAX, which also has to eat the dummy APC that is queued by
qemu_cpu_kick_thread.

We can add the SleepEx call to qemu_wait_io_event under "if
(!tcg_enabled())", since that is the condition that is used in
qemu_cpu_kick_thread, and unify the function for KVM, HAX, HVF and
multi-threaded TCG.  Single-threaded TCG code can also be simplified
since it is only used in the round-robin, sleep-if-all-CPUs-idle case.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
cpus.c