Received: by 2002:a19:ad09:0:0:0:0:0 with SMTP id t9csp4135189lfc; Mon, 31 Aug 2020 17:51:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyscKP0ZhqcXUfuXSNzwiapdEbEf2fKnGHcVUe2p1exTiS/ROBueTk3DKFXhD30xqMux/Ud X-Received: by 2002:a5b:48c:: with SMTP id n12mr5750332ybp.310.1598921474105; Mon, 31 Aug 2020 17:51:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598921474; cv=none; d=google.com; s=arc-20160816; b=gJlxTDTfKm4fNRjREuHOdB3FQP0sZT+cZM5oVHcWXMDpiOb2uTnb3eg3Kr+UEnWegI GHxzpKkUyeY6dioxHkIJA9hrM2pV7SCl/0CbKPwJVP6nQkbc6qwtokxhc3iguyWYVlZy yIN3GsAckRakbM1p9hsZqlH5cgzXB3D2+sZgL50XmvEtjG0uunIm/UxOx5Kdevxg86gf HLn90TEA/1zCLvSBI4LGu8xuezU9bdzaUt6P+rdYoqTmRvCyyFZGxmDIvaLucRMsyfA4 kNDvaDX9Tl2ntv56bc/J+L8Nuv3uDQj2bwEnXrnqFH9YSzZZJVBGWKZTPd7PExkbCU4W vlyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:message-id:date:in-reply-to:subject:cc:to:from :user-agent:references:dkim-signature; bh=cCK3AmjVHxv98ABWp7KgHUgig3wbAYFOJan3OpjBB0U=; b=ogik0K5oRqND3ee/0x6qA13nS2KtaM1HQHWXxhIoPs29hKgs8//roZrNBQOag+1Hgi 7fvAS1kbsK4bDOWlxsizRWujxxb0JMCGbjoh9o7Pcu+iy3bHy14w5ygJO5+B3/NhC5O2 6IqPxPiJprk7osIBWLq7ArwD+1dxbwd/2S5owzhSFHPp30pZ+waNzOwAyLXhQfRn3lwe 6rfDzvkk5lxSs9/kfaC9AvyDcYBgXVnYaOgcrpCMX1Z9vQZOsGCDlC46ywr4Ylc5t3fv f6ZPhfGiHmJi/I+xUMW0iY7dJR49deuv8Qa++4KtMq7gZY99IfHKLUXvJrLX8ihUfeUg sXnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=P8WUTC8q; spf=pass (google.com: domain of bauerman@linux.ibm.com designates 148.163.158.5 as permitted sender) smtp.mailfrom=bauerman@linux.ibm.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com. [148.163.158.5]) by mx.google.com with ESMTPS id 185si10185051ybv.47.2020.08.31.17.51.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 31 Aug 2020 17:51:14 -0700 (PDT) Received-SPF: pass (google.com: domain of bauerman@linux.ibm.com designates 148.163.158.5 as permitted sender) client-ip=148.163.158.5; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=P8WUTC8q; spf=pass (google.com: domain of bauerman@linux.ibm.com designates 148.163.158.5 as permitted sender) smtp.mailfrom=bauerman@linux.ibm.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0810VivY162760; Mon, 31 Aug 2020 20:50:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=references : from : to : cc : subject : in-reply-to : date : message-id : mime-version : content-type; s=pp1; bh=cCK3AmjVHxv98ABWp7KgHUgig3wbAYFOJan3OpjBB0U=; b=P8WUTC8qYbdBTvXSaXGTs2cud4Kt6dDc0IvjWnL4WRjsnGqrIq4KXuPyDGbdlOa4thsp n8D+vOIOBxbuxh8as9bLce6mS5ffCCDlr4nUJFMYc43YpuztnSzRTqGeXEKrVgFwUFV3 AwXxrErWhena17JS40Yo0lU/tp1k4h+grZ53RV2JLssP1PADCLQpN+nptfMrRQ/FjMoG EMKOYPqme7Sqmz3DPOq69Xa7mq3f77Q/Sbklms3oz7aQ1Ja9wA2iFomOtkNsH7D10y78 Wq56k5nW550LxdOW0X0EdE9wcj4o/1DPy5Bz8wh8Oi98m6JSCAGo5CG2ItyDC8P75i4U ZA== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 339bkkrpwg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 31 Aug 2020 20:50:38 -0400 Received: from m0098421.ppops.net (m0098421.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 0810WPoe165466; Mon, 31 Aug 2020 20:50:38 -0400 Received: from ppma02dal.us.ibm.com (a.bd.3ea9.ip4.static.sl-reverse.com [169.62.189.10]) by mx0a-001b2d01.pphosted.com with ESMTP id 339bkkrpw9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 31 Aug 2020 20:50:37 -0400 Received: from pps.filterd (ppma02dal.us.ibm.com [127.0.0.1]) by ppma02dal.us.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 0810m7ZF019490; Tue, 1 Sep 2020 00:50:37 GMT Received: from b01cxnp22034.gho.pok.ibm.com (b01cxnp22034.gho.pok.ibm.com [9.57.198.24]) by ppma02dal.us.ibm.com with ESMTP id 337en9h5nu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 01 Sep 2020 00:50:37 +0000 Received: from b01ledav005.gho.pok.ibm.com (b01ledav005.gho.pok.ibm.com [9.57.199.110]) by b01cxnp22034.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 0810oa9O47776010 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 1 Sep 2020 00:50:36 GMT Received: from b01ledav005.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 46E1DAE060; Tue, 1 Sep 2020 00:50:36 +0000 (GMT) Received: from b01ledav005.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0A75CAE05C; Tue, 1 Sep 2020 00:50:29 +0000 (GMT) Received: from morokweng.localdomain (unknown [9.211.56.43]) by b01ledav005.gho.pok.ibm.com (Postfix) with ESMTPS; Tue, 1 Sep 2020 00:50:28 +0000 (GMT) References: <20200826055535.951207-1-bauerman@linux.ibm.com> <20200831065010.GB36360@yekko.fritz.box> User-agent: mu4e 1.4.10; emacs 27.1 From: Thiago Jung Bauermann To: David Gibson Cc: qemu-ppc@nongnu.org, qemu-arm@nongnu.org, qemu-s390x@nongnu.org, qemu-devel@nongnu.org, Paolo Bonzini , Marcel Apfelbaum , Eduardo Habkost , Richard Henderson , Peter Maydell , Aleksandar Markovic , Aurelien Jarno , Jiaxun Yang , Aleksandar Rikalo , Mark Cave-Ayland , Artyom Tarasenko , Cornelia Huck , Thomas Huth , David Hildenbrand , Philippe =?utf-8?Q?Mathieu-Daud=C3=A9?= , Alex =?utf-8?Q?Benn=C3=A9e?= , Greg Kurz , Igor Mammedov , =?utf-8?Q?C=C3=A9d?= =?utf-8?Q?ric?= Le Goater Subject: Re: [PATCH v7 0/8] Generalize start-powered-off property from ARM In-reply-to: <20200831065010.GB36360@yekko.fritz.box> Date: Mon, 31 Aug 2020 21:50:25 -0300 Message-ID: <87mu2a2ucu.fsf@morokweng.localdomain> MIME-Version: 1.0 Content-Type: text/plain X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235,18.0.687 definitions=2020-08-31_10:2020-08-31,2020-08-31 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 priorityscore=1501 spamscore=0 clxscore=1015 malwarescore=0 adultscore=0 bulkscore=0 phishscore=0 mlxlogscore=999 mlxscore=0 suspectscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2008310145 X-TUID: ssh6Nza9InAH David Gibson writes: > On Wed, Aug 26, 2020 at 02:55:27AM -0300, Thiago Jung Bauermann wrote: >> This version fixes `make check` failures in ppc/e500.c, mips/cps.c and >> sparc/sun4m.c. This was done by moving the qdev_realize_and_unref() call as >> close as possible to the object_new() call, in order to keep the CPU object >> construction as similar as possible to the earlier version which used >> cpu_create(). >> >> I also had to change the patch which removed the main_cpu_reset() function >> from sparc/sun4m.c. It was causing a `make check` failure but I can't >> really explain why. See this message for a few more details: >> >> https://lists.nongnu.org/archive/html/qemu-ppc/2020-08/msg00419.html >> >> I dropped the Reviewed-by's on the changed patches because of these >> changes. >> >> Original cover letter below, followed by changelog: >> >> The ARM code has a start-powered-off property in ARMCPU, which is a >> subclass of CPUState. This property causes arm_cpu_reset() to set >> CPUState::halted to 1, signalling that the CPU should start in a halted >> state. Other architectures also have code which aim to achieve the same >> effect, but without using a property. >> >> The ppc/spapr version has a bug where QEMU does a KVM_RUN on the vcpu >> before cs->halted is set to 1, causing the vcpu to run while it's still in >> an unitialized state (more details in patch 3). >> >> Peter Maydell mentioned the ARM start-powered-off property and >> Eduardo Habkost suggested making it generic, so this patch series does >> that, for all cases which I was able to find via grep in the code. >> >> The only problem is that I was only able to test these changes on a ppc64le >> pseries KVM guest, so except for patches 2 and 3, all others are only >> build-tested. Also, my grasp of QOM lifecycle is basically non-existant so >> please be aware of that when reviewing this series. >> >> The last patch may be wrong, as pointed out by Eduardo, so I marked it as >> RFC. It may make sense to drop it. > > Applied to ppc-for-5.2, thanks. Thank you! -- Thiago Jung Bauermann IBM Linux Technology Center