Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EA365C433E1 for ; Fri, 10 Jul 2020 20:03:40 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B95992075D for ; Fri, 10 Jul 2020 20:03:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B95992075D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.ibm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:42758 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jtzFD-0007Fj-VT for qemu-devel@archiver.kernel.org; Fri, 10 Jul 2020 16:03:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36768) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jtzEZ-0006iZ-0l; Fri, 10 Jul 2020 16:02:59 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:21876) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jtzEX-0000p3-0j; Fri, 10 Jul 2020 16:02:58 -0400 Received: from pps.filterd (m0098394.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 06AK26lP053499; Fri, 10 Jul 2020 16:02:48 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 326bpkem8a-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 10 Jul 2020 16:02:48 -0400 Received: from m0098394.ppops.net (m0098394.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 06AK2m1P056737; Fri, 10 Jul 2020 16:02:48 -0400 Received: from ppma01wdc.us.ibm.com (fd.55.37a9.ip4.static.sl-reverse.com [169.55.85.253]) by mx0a-001b2d01.pphosted.com with ESMTP id 326bpkem7n-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 10 Jul 2020 16:02:48 -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 06AK0x7n004538; Fri, 10 Jul 2020 20:02:46 GMT Received: from b01cxnp22035.gho.pok.ibm.com (b01cxnp22035.gho.pok.ibm.com [9.57.198.25]) by ppma01wdc.us.ibm.com with ESMTP id 326bce757g-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 10 Jul 2020 20:02:46 +0000 Received: from b01ledav004.gho.pok.ibm.com (b01ledav004.gho.pok.ibm.com [9.57.199.109]) by b01cxnp22035.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 06AK2kKT36241788 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 10 Jul 2020 20:02:46 GMT Received: from b01ledav004.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 78613112062; Fri, 10 Jul 2020 20:02:46 +0000 (GMT) Received: from b01ledav004.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 90E32112061; Fri, 10 Jul 2020 20:02:43 +0000 (GMT) Received: from morokweng.localdomain (unknown [9.163.82.145]) by b01ledav004.gho.pok.ibm.com (Postfix) with ESMTPS; Fri, 10 Jul 2020 20:02:43 +0000 (GMT) References: <87y2nu3nxq.fsf@morokweng.localdomain> <20200708100038.GG18595@umbus.fritz.box> <20200708152540.GZ7276@habkost.net> <20200708160316.GA7276@habkost.net> <20200708173620.GB780932@habkost.net> <20200708213240.GC780932@habkost.net> <87k0zdz8ud.fsf@morokweng.localdomain> <87imexz7v6.fsf@morokweng.localdomain> <973a6add-715d-319b-0e69-f0c78ef5a7d4@redhat.com> User-agent: mu4e 1.2.0; emacs 26.3 From: Thiago Jung Bauermann To: Philippe =?utf-8?Q?Mathieu-Daud=C3=A9?= Subject: Re: [PATCH] cpu: Add starts_halted() method In-reply-to: <973a6add-715d-319b-0e69-f0c78ef5a7d4@redhat.com> Date: Fri, 10 Jul 2020 17:02:38 -0300 Message-ID: <87k0zb16ld.fsf@morokweng.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235, 18.0.687 definitions=2020-07-10_14:2020-07-10, 2020-07-10 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 mlxlogscore=999 mlxscore=0 adultscore=0 impostorscore=0 lowpriorityscore=0 malwarescore=0 priorityscore=1501 bulkscore=0 clxscore=1015 spamscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2007100130 Received-SPF: pass client-ip=148.163.156.1; envelope-from=bauerman@linux.ibm.com; helo=mx0a-001b2d01.pphosted.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/07/10 16:02:54 X-ACL-Warn: Detected OS = Linux 3.x [generic] [fuzzy] 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, URIBL_BLOCKED=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: Laurent Vivier , Peter Maydell , Thomas Huth , Eduardo Habkost , QEMU Developers , qemu-ppc , Alex =?utf-8?Q?Benn=C3=A9e?= , David Gibson Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Philippe Mathieu-Daud=C3=A9 writes: > On 7/9/20 5:26 AM, Thiago Jung Bauermann wrote: >> >> Thiago Jung Bauermann writes: >> >>> I'm seeing the vcpu being KVM_RUN'd too early twice during hotplug. >>> Both of them are before cpu_reset() and ppc_cpu_reset(). >> >> Hm, rereading the message obviously the above is partially wrong. The >> second case happens during ppc_cpu_reset(). >> >>> Here's the second: >>> >>> #0 in qemu_cpu_kick_thread () >>> #1 in qemu_cpu_kick () >>> #2 in queue_work_on_cpu () >>> #3 in async_run_on_cpu () >>> #4 in tlb_flush_by_mmuidx () >>> #5 in tlb_flush () >>> #6 in ppc_tlb_invalidate_all () >>> #7 in ppc_cpu_reset () >>> #8 in device_transitional_reset () >>> #9 in resettable_phase_hold () >>> #10 in resettable_assert_reset () >>> #11 in device_set_realized () > > Dunno if related, might be helpful: > https://www.mail-archive.com/qemu-devel@nongnu.org/msg686477.html Yes, it's helpful. Thanks! So is was it resolved whether it's appropriate to do a cpu_reset() within realize? Is the core of the problem that device_set_realize() ends up calling ppc_cpu_reset()? -- Thiago Jung Bauermann IBM Linux Technology Center