From a342173ab78fd8b126f27a7a5dbfb097a32f0ed7 Mon Sep 17 00:00:00 2001 From: David Hildenbrand Date: Fri, 9 Feb 2018 20:52:37 +0100 Subject: 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 Message-Id: <20180209195239.16048-2-david@redhat.com> Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini --- cpus.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'cpus.c') diff --git a/cpus.c b/cpus.c index 4f5f88edba..970390b8a9 100644 --- a/cpus.c +++ b/cpus.c @@ -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; } } -- cgit v1.2.1