From patchwork Fri Feb 9 19:52:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Hildenbrand X-Patchwork-Id: 871560 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zdQkS68cjz9sDB for ; Sat, 10 Feb 2018 06:54:24 +1100 (AEDT) Received: from localhost ([::1]:34699 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ekEkY-00027e-TT for incoming@patchwork.ozlabs.org; Fri, 09 Feb 2018 14:54:22 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56710) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ekEjC-0001Le-2K for qemu-devel@nongnu.org; Fri, 09 Feb 2018 14:52:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ekEj7-0002yl-Q3 for qemu-devel@nongnu.org; Fri, 09 Feb 2018 14:52:58 -0500 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:57672 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ekEj7-0002xt-LL for qemu-devel@nongnu.org; Fri, 09 Feb 2018 14:52:53 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DE1FAEAE83; Fri, 9 Feb 2018 19:52:49 +0000 (UTC) Received: from t460s.redhat.com (ovpn-116-73.ams2.redhat.com [10.36.116.73]) by smtp.corp.redhat.com (Postfix) with ESMTP id 94B48100F9F3; Fri, 9 Feb 2018 19:52:46 +0000 (UTC) From: David Hildenbrand To: qemu-devel@nongnu.org Date: Fri, 9 Feb 2018 20:52:37 +0100 Message-Id: <20180209195239.16048-2-david@redhat.com> In-Reply-To: <20180209195239.16048-1-david@redhat.com> References: <20180209195239.16048-1-david@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Fri, 09 Feb 2018 19:52:49 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Fri, 09 Feb 2018 19:52:49 +0000 (UTC) for IP:'10.11.54.3' DOMAIN:'int-mx03.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'david@redhat.com' RCPT:'' X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.187.233.73 Subject: [Qemu-devel] [PATCH v1 1/3] cpus: properly inititalize CPU > 1 under single-threaded TCG X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , Richard Henderson , David Hildenbrand , Peter Crosthwaite Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" All but the first CPU are currently not fully inititalized (e.g. cpu->created is never set). Signed-off-by: David Hildenbrand --- cpus.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cpus.c b/cpus.c index f298b659f4..ade1651032 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; } }