From nobody Mon Feb 9 23:02:45 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1599191594; cv=none; d=zohomail.com; s=zohoarc; b=J3qsHi9ieC6rN8GKBnb3ouoAN29sK66q7N39vNgV9s47O6A3E4DbDEvdh0bKZZXEK/MY8IqJGTnyYxPL7YhMQI8OtH68YdMWmb21M9z8nq14KmGowVcXTY7ZtRVt4Lfjm2KIWj+cjFSNDUAvcGNiCbeN5duwXkCwBPZAon3elx8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1599191594; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=LTdL1SdvYh/d3FrvK0YpfxC+qEU1i/yW9n7g0B5rwQY=; b=EBwfwJB+E+qxKgHp+z3ldPWNBd26ew19hItCD0Qgy77b/ez9cemsGucd47N/0a6YFEGEZ8IM9lvFgFQc/zTsvi35uFQQE0N+hqvVn+lFBMwYZFPgc2YXvxQXqIe4qAmAUks1IEwI7H6fAXl7LU4f2J902//5zXHsj0vFWVAqf2U= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1599191594131431.3680228516639; Thu, 3 Sep 2020 20:53:14 -0700 (PDT) Received: from localhost ([::1]:52478 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kE2mn-0003Td-AS for importer@patchew.org; Thu, 03 Sep 2020 23:53:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54828) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kE2hd-0002n3-0D; Thu, 03 Sep 2020 23:47:53 -0400 Received: from ozlabs.org ([203.11.71.1]:40113) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kE2ha-0004xH-W4; Thu, 03 Sep 2020 23:47:52 -0400 Received: by ozlabs.org (Postfix, from userid 1007) id 4BjNsr50J4z9sW6; Fri, 4 Sep 2020 13:47:28 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1599191248; bh=Ed8eNmI6TeOF00ug4vwXg3Ihw5WGZ2MpoWZJgwfPLvg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eJELicU8YoHUPSL3z+u97ttGXNVHhgNt0QpRwsWZi7NRRwtF7lfd4QTCshjO7IRQr udVFqn/NLSUg9ALTElcRSq6W/yNe32EwhKFDS1/ShHxZL+RfXpJZo7x3xmsWkQinza oBPV/VJcdpDuE+LUV3+byjj0qzbGh/wa377ck5fM= From: David Gibson To: peter.maydell@linaro.org Subject: [PULL 18/30] ppc/e500: Use start-powered-off CPUState property Date: Fri, 4 Sep 2020 13:47:07 +1000 Message-Id: <20200904034719.673626-19-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200904034719.673626-1-david@gibson.dropbear.id.au> References: <20200904034719.673626-1-david@gibson.dropbear.id.au> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=203.11.71.1; envelope-from=dgibson@ozlabs.org; helo=ozlabs.org X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/03 23:47:26 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: danielhb413@gmail.com, qemu-devel@nongnu.org, groug@kaod.org, qemu-ppc@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , bauerman@linux.ibm.com, David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Thiago Jung Bauermann Instead of setting CPUState::halted to 1 in ppce500_cpu_reset_sec(), use the start-powered-off property which makes cpu_common_reset() initialize it to 1 in common code. Also change creation of CPU object from cpu_create() to object_new() and qdev_realize_and_unref() because cpu_create() realizes the CPU and it's not possible to set a property after the object is realized. Signed-off-by: Thiago Jung Bauermann Message-Id: <20200826055535.951207-5-bauerman@linux.ibm.com> Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: David Gibson --- hw/ppc/e500.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c index ab9884e315..ae39b9358e 100644 --- a/hw/ppc/e500.c +++ b/hw/ppc/e500.c @@ -704,9 +704,6 @@ static void ppce500_cpu_reset_sec(void *opaque) =20 cpu_reset(cs); =20 - /* Secondary CPU starts in halted state for now. Needs to change when - implementing non-kernel boot. */ - cs->halted =3D 1; cs->exception_index =3D EXCP_HLT; } =20 @@ -865,7 +862,7 @@ void ppce500_init(MachineState *machine) CPUState *cs; qemu_irq *input; =20 - cpu =3D POWERPC_CPU(cpu_create(machine->cpu_type)); + cpu =3D POWERPC_CPU(object_new(machine->cpu_type)); env =3D &cpu->env; cs =3D CPU(cpu); =20 @@ -875,6 +872,14 @@ void ppce500_init(MachineState *machine) exit(1); } =20 + /* + * Secondary CPU starts in halted state for now. Needs to change + * when implementing non-kernel boot. + */ + object_property_set_bool(OBJECT(cs), "start-powered-off", i !=3D 0, + &error_fatal); + qdev_realize_and_unref(DEVICE(cs), NULL, &error_fatal); + if (!firstenv) { firstenv =3D env; } --=20 2.26.2