Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp985926rwd; Thu, 25 May 2023 06:45:33 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6Jz1rP/lFWqGJnsyN5cSYMe3fWHXRfuQd90WfMFb0kugJmEGZtWWUKWcsEOZjA7xZZ5ZuT X-Received: by 2002:a05:6a00:2d23:b0:64d:2a87:2596 with SMTP id fa35-20020a056a002d2300b0064d2a872596mr3533068pfb.10.1685022332560; Thu, 25 May 2023 06:45:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685022332; cv=none; d=google.com; s=arc-20160816; b=b0a5T2oxseTwD8JqPMeNiBI6W93a4xW3U4r0We/iLk01HTR3BEapcvmAiVaixNrM+T Go2palcEq6roYpGdyCar9SUWeXpba+OE/efuvGy2L4TMVJ+Evcxwh0Ujy9CNrPlMNaw5 5wdpsvSuYqnTrDbsDXV97mC4CsdTY9CLNQAXo4NIFSXGedqICDAfpUUOon1uDiA4RuAR 7HmQYMJInsqZS4z9lmG9Ac8ka4BA38ynZ/AoqEkQUGx1HvGuqMTowHxzpfTXImC9A/vO ne4iAs+hFjZ1m5IX0RUBAm4HoWfCOfTcTdjni34ObVnCgK1XIF+YnTX/ahk+OU2rAN1r V0KQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=7/MPnMSTTqvi1h2V28m7HvVkRafCnNib35+NgbBtu4I=; b=JEoZTID5z9c5gfvvr3EmSiwHuUYBtNaHZ7mFrQQhTyCwDi9KTP1n2V7cCPRHrvR2YO QvJdbynI8EFugYqxxJ6d+8k5yAprtr1CZ8xJKCbbs9VNP7KRlOSYn3yqVubP3DRuPEFZ 9EkRurHWWV8bR2Lpg2VYHhlOe1ETYxonqqFWodWSlVAHh0/89nK5zLEgdo4LTmLOUzaw +8RE0Pa6w8J6Hbk5intFPSaaoTBODkSvVnPaqqfqtE/e/mTEmEGjyRmjo1iBWGjqtb1W wosP96HtOZF1IcpEE6wCkps1+s2y/9VPaQto/v1dGb8lpwmR0DnARJqSV/ksRPNwlRxZ iCCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=iUqrv4dJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j67-20020a636e46000000b00528593926e3si1228081pgc.627.2023.05.25.06.45.17; Thu, 25 May 2023 06:45:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=iUqrv4dJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241175AbjEYNif (ORCPT + 99 others); Thu, 25 May 2023 09:38:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55998 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241201AbjEYNie (ORCPT ); Thu, 25 May 2023 09:38:34 -0400 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3051AE4E for ; Thu, 25 May 2023 06:38:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1685021898; x=1716557898; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=7/MPnMSTTqvi1h2V28m7HvVkRafCnNib35+NgbBtu4I=; b=iUqrv4dJh4xPsLSq1R5ptPyeXBmfArWU3yNjjUhb6am12g08fbUMQ2id Qxs5m1r680A7Xq8VcAK3xv2WljMpBKk115ox9jnYG4AqVovOD5vPFGzNY 2a1bUiOlWaqVHGATO4TdsNgIQtzaBB6ArTGpc1R70/sMfOg3Q21HnpVsp zuqkSOWpbkfoxnwfMys50g9PWnOUAx9Bv4p7kqpAPo63zy/rolR6H0xBM obrqoDgJ0UXD+2Ly79NpvwZdBa39Xjn0uCoe0VpUq9VKkLBxsOVlE+fUl /OoSFuLUW4MNR8LQXRTd72/mK0DqgnmsKTDgY3TPTsh704snonIovB5E3 w==; X-IronPort-AV: E=Sophos;i="6.00,191,1681196400"; d="asc'?scan'208";a="153913613" X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa6.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 25 May 2023 06:38:08 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Thu, 25 May 2023 06:38:08 -0700 Received: from wendy (10.10.115.15) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21 via Frontend Transport; Thu, 25 May 2023 06:38:05 -0700 Date: Thu, 25 May 2023 14:37:43 +0100 From: Conor Dooley To: Anup Patel CC: Atish Patra , Alexandre Ghiti , , Alexandre Ghiti , , Anup Patel , , , , , Guo Ren , Paul Walmsley , Song Shuai , , Andrew Jones Subject: Re: Bug report: kernel paniced when system hibernates Message-ID: <20230525-postnasal-monopoly-98adb96ffaa1@wendy> References: <20230517-preacher-primer-f41020b3376a@wendy> <20230525-guacamole-swimmer-68048a73baac@wendy> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="JrOGZxtEPS2oo1aX" Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --JrOGZxtEPS2oo1aX Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, May 25, 2023 at 06:51:28PM +0530, Anup Patel wrote: > > We should only rely on this node name for known bad versions of opensbi > > IMO. Going forward, if something needs to be reserved for firmware, the > > firmware should make sure that it is reserved by using the property for > > that purpose :) > There is no issue with OpenSBI since it does the right thing by marking > memory as reserved in the DT. This real issue is with the kernel handling > of reserved memory for hibernate. I don't think we are talking about the same thing here. I meant the no-map property which OpenSBI does not set. > Like Atish mentioned, not just OpenSBI, there will be other entities > (like TSM) or some other M-mode firmware which will also reserve > memory in DT/ACPI so clearly kernel needs a SBI implementation > independent way of handling reserved memory for hibernate. > > > Another option is to use compatible string or label property to indicate > > > that this memory region is not to be saved/restored during hibernation. > > > This can be documented in RISC-V DT bindings as well as the booting guide > > > doc that alex was talking about. > > > > Sure, a dt-binding for sbi reserved regions doesn't immediately sound > > like an awful idea... But we still have to work around the borked > > firmware - be that disabling hibernation or using the mmode_resv node > > when we know that the version of OpenSBI is one of those with the > > problem. Did you skip over this? I was agreeing that defining a common binding for sbi reserved regions was a good idea. --JrOGZxtEPS2oo1aX Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZG9kpwAKCRB4tDGHoIJi 0p+GAQCn1Y7yJhVNQl0WAf2V+rgtzqGw5oM5zSzgGijoW2F4KQD/X+ycRbX3wKqC IsL+AdtJs3lRjPV4gheoUkWsJcmvAA8= =S5k1 -----END PGP SIGNATURE----- --JrOGZxtEPS2oo1aX--