From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by 2002:ac2:5042:0:0:0:0:0 with SMTP id a2csp297785lfm; Tue, 21 Jul 2020 20:55:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwT8KfeCkSObdTCDJzuHRZp5/RSjWOjNaNO+91rGRia+D2DAJLxFNj2v+yHsgw07WJAgrAI X-Received: by 2002:a25:7689:: with SMTP id r131mr50570903ybc.125.1595390101912; Tue, 21 Jul 2020 20:55:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595390101; cv=none; d=google.com; s=arc-20160816; b=gN/0kb7POj5LFHOTZlTYRciO06PWME3wjHY33nnNs8C+DabfKeU2YLDLp7iONFEHNb kdK1QbtB2CZ7uVFTfUKjiQKexSm/BeqmgHbHQkvJYTyNTD2be2Ffl+txkY6SjNU+eUq8 VKAxshXSIwydppmxV1EipFWyD+AGaSQnf4aTV4mgUcUhvr1+aWHUdC3487QJCSMelsRz vETup5urbncahwDB8bjU8CxyKwvU4vbNqFjX7Fz2Pew1DDilSEJEx6BxtU3aTbN+pAjZ p5+K3yC53c4rve3R8KKg9YKYVn6rulMeO45PgNsolO/cRjWZ7Suu8LciCRcrT8VtemLY Re8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from; bh=7rPKX8qWPo5/yCdNsB0+okBlMnKYixFu87VjY44jtpM=; b=xhjdwbjv9jF8yBuD7eg3Sw0Lk+QWguBYI1GcsFWjpWpyWbQsFmDTEOO/SzGWgY6VB+ 1nN/juFfLFK6ISxd3+MgBoWp6y6GilRhgOw+ys8vNgEUDJwAxIY/4AdKDwMSQdx4W108 MI13LzFPI4yUop0rH9AQgIcZ1TDpR27ypTHA7y7UJPR0kKFxmpISqsWZdtiPpTIfiJUf 3LSK0jq8HJ5VmMhhPf+6hJHODpAlpehfpYmNxfwR/vFby0TFIoYl9t3VwJ6Ux03jRxlE iYaKYYa42aL67KJvMmsp+94ITWxw/OJom7PwQTrl/yzYi1y2v++rP4l9OO0rd72Sk+VC ZSZw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id s16si21206408ybk.327.2020.07.21.20.55.01 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 21 Jul 2020 20:55:01 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: from localhost ([::1]:38438 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jy5qP-0003WK-8n for alex.bennee@linaro.org; Tue, 21 Jul 2020 23:55:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43470) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jy5nh-0006aC-90; Tue, 21 Jul 2020 23:52:13 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:23444 helo=mx0a-001b2d01.pphosted.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jy5nf-0003v7-J5; Tue, 21 Jul 2020 23:52:12 -0400 Received: from pps.filterd (m0098413.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 06M3VPwr137582; Tue, 21 Jul 2020 23:51:53 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com with ESMTP id 32d982m6f2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 21 Jul 2020 23:51:52 -0400 Received: from m0098413.ppops.net (m0098413.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 06M3emdt161844; Tue, 21 Jul 2020 23:51:52 -0400 Received: from ppma01wdc.us.ibm.com (fd.55.37a9.ip4.static.sl-reverse.com [169.55.85.253]) by mx0b-001b2d01.pphosted.com with ESMTP id 32d982m6ew-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 21 Jul 2020 23:51:52 -0400 Received: from pps.filterd (ppma01wdc.us.ibm.com [127.0.0.1]) by ppma01wdc.us.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 06M3naoY019930; Wed, 22 Jul 2020 03:51:51 GMT Received: from b01cxnp23033.gho.pok.ibm.com (b01cxnp23033.gho.pok.ibm.com [9.57.198.28]) by ppma01wdc.us.ibm.com with ESMTP id 32brq90pqa-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 22 Jul 2020 03:51:51 +0000 Received: from b01ledav005.gho.pok.ibm.com (b01ledav005.gho.pok.ibm.com [9.57.199.110]) by b01cxnp23033.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 06M3ppVH55902704 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 22 Jul 2020 03:51:51 GMT Received: from b01ledav005.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 31547AE05F; Wed, 22 Jul 2020 03:51:51 +0000 (GMT) Received: from b01ledav005.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E9047AE05C; Wed, 22 Jul 2020 03:51:44 +0000 (GMT) Received: from morokweng.localdomain.com (unknown [9.163.58.88]) by b01ledav005.gho.pok.ibm.com (Postfix) with ESMTP; Wed, 22 Jul 2020 03:51:44 +0000 (GMT) From: Thiago Jung Bauermann To: qemu-ppc@nongnu.org Subject: [PATCH v2 5/9] mips/cps: Use start-powered-off CPUState property Date: Wed, 22 Jul 2020 00:50:12 -0300 Message-Id: <20200722035016.469075-6-bauerman@linux.ibm.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200722035016.469075-1-bauerman@linux.ibm.com> References: <20200722035016.469075-1-bauerman@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235, 18.0.687 definitions=2020-07-22_01:2020-07-21, 2020-07-21 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 clxscore=1015 phishscore=0 impostorscore=0 mlxscore=0 spamscore=0 lowpriorityscore=0 priorityscore=1501 bulkscore=0 mlxlogscore=899 adultscore=0 suspectscore=1 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2007220020 Received-SPF: pass client-ip=148.163.158.5; envelope-from=bauerman@linux.ibm.com; helo=mx0a-001b2d01.pphosted.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/07/21 23:52:01 X-ACL-Warn: Detected OS = Linux 3.x [generic] X-Spam_score_int: -35 X-Spam_score: -3.6 X-Spam_bar: --- X-Spam_report: (-3.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=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: Thiago Jung Bauermann , Peter Maydell , Aleksandar Rikalo , Eduardo Habkost , Aleksandar Markovic , Cornelia Huck , Mark Cave-Ayland , qemu-devel@nongnu.org, qemu-s390x@nongnu.org, qemu-arm@nongnu.org, Artyom Tarasenko , Thomas Huth , Paolo Bonzini , David Hildenbrand , Richard Henderson , Aurelien Jarno , David Gibson Errors-To: qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org Sender: "Qemu-devel" X-TUID: HYo8Wothr6Cd Instead of setting CPUState::halted to 1 in main_cpu_reset(), use the start-powered-off property which makes cpu_common_reset() initialize it to 1 in common code. Signed-off-by: Thiago Jung Bauermann --- hw/mips/cps.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) NB: I was only able to test that this patch builds. I wasn't able to run it. diff --git a/hw/mips/cps.c b/hw/mips/cps.c index 615e1a1ad2..d5b6c78019 100644 --- a/hw/mips/cps.c +++ b/hw/mips/cps.c @@ -52,9 +52,6 @@ static void main_cpu_reset(void *opaque) CPUState *cs = CPU(cpu); cpu_reset(cs); - - /* All VPs are halted on reset. Leave powering up to CPC. */ - cs->halted = 1; } static bool cpu_mips_itu_supported(CPUMIPSState *env) @@ -89,6 +86,9 @@ static void mips_cps_realize(DeviceState *dev, Error **errp) env->itc_tag = mips_itu_get_tag_region(&s->itu); env->itu = &s->itu; } + /* All VPs are halted on reset. Leave powering up to CPC. */ + object_property_set_bool(OBJECT(cpu), "start-powered-off", true, + &error_abort); qemu_register_reset(main_cpu_reset, cpu); }