Commit a342173a authored by David Hildenbrand's avatar David Hildenbrand Committed by Paolo Bonzini
Browse files

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: default avatarDavid Hildenbrand <david@redhat.com>
Message-Id: <20180209195239.16048-2-david@redhat.com>
Reviewed-by: default avatarRichard Henderson <richard.henderson@linaro.org>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent 14545097
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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;
    }
}