diff options
author | David Hildenbrand <david@redhat.com> | 2018-02-09 20:52:37 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2018-03-06 14:00:59 +0100 |
commit | a342173ab78fd8b126f27a7a5dbfb097a32f0ed7 (patch) | |
tree | 25bd67c35ff89acc02b5f332598b55aa9690b85d /cpus.c | |
parent | 1454509726719e0933c800fad00d6999752688ea (diff) |
cpus: properly inititalize CPU > 1 under single-threaded TCG
All but the first CPU are currently not fully inititalized (e.g.
cpu->created is never set).
Signed-off-by: David Hildenbrand <david@redhat.com>
Message-Id: <20180209195239.16048-2-david@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'cpus.c')
-rw-r--r-- | cpus.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -1863,6 +1863,9 @@ static void qemu_tcg_init_vcpu(CPUState *cpu) /* For non-MTTCG cases we share the thread */ cpu->thread = single_tcg_cpu_thread; cpu->halt_cond = single_tcg_halt_cond; + cpu->thread_id = first_cpu->thread_id; + cpu->can_do_io = 1; + cpu->created = true; } } |