diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2018-11-28 11:32:33 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2018-11-28 11:32:33 +0000 |
commit | c56606684ad253fad1fc160a225295bcfb3fba14 (patch) | |
tree | 3945ebc96fcf7c3701e03c66b52d2137c67363de /cpus.c | |
parent | 039d4e3df0049bdd8f93a2de735a816483b13954 (diff) | |
parent | 86100290cb6600b3d65e0794b45c1b82ead99411 (diff) |
Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging
* lsi HBA reselection fix (George)
* Small cleanups (Li Qiang)
* bugfixes for vhost-user-bridge and hostmem (Marc-André)
* single-thread TCG fix (me)
* VMX migration blocker (me)
* target/i386 fix for LOCK (Richard)
* MAINTAINERS update (Philippe, Thomas)
# gpg: Signature made Wed 28 Nov 2018 10:51:36 GMT
# gpg: using RSA key BFFBD25F78C7AE83
# gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>"
# gpg: aka "Paolo Bonzini <pbonzini@redhat.com>"
# Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4 E2F7 7E15 100C CD36 69B1
# Subkey fingerprint: F133 3857 4B66 2389 866C 7682 BFFB D25F 78C7 AE83
* remotes/bonzini/tags/for-upstream:
hostmem: no need to check for host_memory_backend_mr_inited() in alloc()
hostmem-memfd: honour share=on/off property
MAINTAINERS: Add an entry for the Firmware Configuration (fw_cfg) device
MAINTAINERS: Add some missing entries related to accelerators
target/i386: Generate #UD when applying LOCK to a register destination
checkpatch: g_test_message does not need a trailing newline
vl.c: remove outdated comment
vhost-user-bridge: fix recvmsg iovlen
vl: Improve error message when we can't load fw_cfg from file
vmstate: constify VMStateField
migration: savevm: consult migration blockers
lsi: Reselection needed to remove pending commands from queue
cpus: run work items for all vCPUs if single-threaded
target/i386: kvm: add VMX migration blocker
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'cpus.c')
-rw-r--r-- | cpus.c | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -1220,16 +1220,20 @@ static void qemu_wait_io_event_common(CPUState *cpu) process_queued_cpu_work(cpu); } -static void qemu_tcg_rr_wait_io_event(CPUState *cpu) +static void qemu_tcg_rr_wait_io_event(void) { + CPUState *cpu; + while (all_cpu_threads_idle()) { stop_tcg_kick_timer(); - qemu_cond_wait(cpu->halt_cond, &qemu_global_mutex); + qemu_cond_wait(first_cpu->halt_cond, &qemu_global_mutex); } start_tcg_kick_timer(); - qemu_wait_io_event_common(cpu); + CPU_FOREACH(cpu) { + qemu_wait_io_event_common(cpu); + } } static void qemu_wait_io_event(CPUState *cpu) @@ -1562,7 +1566,7 @@ static void *qemu_tcg_rr_cpu_thread_fn(void *arg) qemu_notify_event(); } - qemu_tcg_rr_wait_io_event(cpu ? cpu : first_cpu); + qemu_tcg_rr_wait_io_event(); deal_with_unplugged_cpus(); } |