Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1041373rwd; Thu, 25 May 2023 07:21:25 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7wWaPZzZiaMxdxZBnwptzxW9a2l/qLt9gzWnPeLNMTZoiEtvCX+3HQiaECV1fFnw6vvTLZ X-Received: by 2002:a17:902:ca0b:b0:1ae:52ea:5fa6 with SMTP id w11-20020a170902ca0b00b001ae52ea5fa6mr1781382pld.8.1685024485056; Thu, 25 May 2023 07:21:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685024485; cv=none; d=google.com; s=arc-20160816; b=nzPXoUEaT5jOZl/F6PCyzqlOzcVuSPKS+rEveFwnzRe2S2T8NcQnpPIM/Qy4G+viNm CmDFFeZKsIh2stXthMxqanFU1eLafgsW1MQeqH06gGLHjc5PJMYAJThuRTGyUKLM66s/ WwVGEEJ2Si+HUaR1S3KqLnEJhuyNPmSTC6Ewwh8mp3cbCkDm+OXWg5+1gTUCwVds2u+1 Nl/meJboco2K4miHHG69AMucKmnscZ2e03J06l4rYprq47hZFZ/5+G2Io1HVMpAx5aes 2AO5H3d5SGTfcbhBIVp8LiZ36WENEG0ha7RARsmclfFv3jhRzwe3lqz2c1hLwf57YVqC Uo9w== 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=c/51Vo0R05mz1U21BlbdotZ1dIf8ZzyWdeNyPt9wnvw=; b=wjhhk1UUZP2BcjgDhYQRmX7pqS1CCmTNRY3Nj8b6lxVfNefcMX6WeW9M8dW63jZ0th 4dRkQcmuTPQdJMF1cRAijGE5fppr7oDRBJqsFpIxiC3rx80O66+ajkNariMYI7F3QRc6 s+Xn+tXPomFgdnarQHxK1gVx09b4Gqh0UbwBI3g/+y0kw8ceyRQrDwvuDJ47SPgSfosE M6coDCpF5k03ohnlkFOK1NDOWvhKUhG6bea6QeEK8MfFK3hNY0JF5kholJCN51YCpOmp eipw9c+44ST4Pe/OS67NemSMkEYbw3FhW7vlXHjwxBfjbc4yVDTTIDZ1svIlQnPYmYqP cQaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b="LCFG/ecS"; 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 y13-20020a17090322cd00b001a64fba3382si1744487plg.148.2023.05.25.07.21.09; Thu, 25 May 2023 07:21:25 -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="LCFG/ecS"; 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 S241414AbjEYN4O (ORCPT + 99 others); Thu, 25 May 2023 09:56:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37600 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241413AbjEYN4N (ORCPT ); Thu, 25 May 2023 09:56:13 -0400 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6D0BE189 for ; Thu, 25 May 2023 06:56:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1685022969; x=1716558969; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=c/51Vo0R05mz1U21BlbdotZ1dIf8ZzyWdeNyPt9wnvw=; b=LCFG/ecSaCjg4emZSjth13I/Pyi5+iK5pkMl+EskzivJq9Qiwsdfy7NH 1pQx1K2qWxtxTkq76Nq18+zVWwviv5HYK5XwQFXIQaet/vjpvLbQ48Nii oPjgDZOwLLK6y9GBZW+mDxGb1CYqKBqWb/amA3K/lE9bJ6aj1yA54/hy0 G7IkAHY0DrP+EIBMiL+hR1oi0y59g6kG2cLVFT25cq7pmpaK7hmL1A7Ud Bh7H7Nx5d0Kx/tqP8Yicj9YXvWgNibs+/0Re5Iu/xq1QXWzm5AWinWLQ6 UKM80Z6M0xC7faLo9rQu5iGANwm+qFRIUh55EruAMRkWV2YdSXMeRFtka w==; X-IronPort-AV: E=Sophos;i="6.00,191,1681196400"; d="asc'?scan'208";a="153915101" 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:56:07 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.85.143) 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; Thu, 25 May 2023 06:56:07 -0700 Received: from wendy (10.10.115.15) by chn-vm-ex01.mchp-main.com (10.10.85.143) 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:56:05 -0700 Date: Thu, 25 May 2023 14:55:42 +0100 From: Conor Dooley To: Anup Patel CC: Anup Patel , Atish Patra , Alexandre Ghiti , , Alexandre Ghiti , , , , , , Guo Ren , Paul Walmsley , Song Shuai , , Andrew Jones Subject: Re: Bug report: kernel paniced when system hibernates Message-ID: <20230525-shrapnel-precut-26500fca4a48@wendy> References: <20230517-preacher-primer-f41020b3376a@wendy> <20230525-guacamole-swimmer-68048a73baac@wendy> <20230525-postnasal-monopoly-98adb96ffaa1@wendy> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="OFwHiDdDsq9ntBHt" 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 --OFwHiDdDsq9ntBHt Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, May 25, 2023 at 07:13:11PM +0530, Anup Patel wrote: > On Thu, May 25, 2023 at 7:08=E2=80=AFPM Conor Dooley wrote: > > > > 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 ope= nsbi > > > > 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 marki= ng > > > memory as reserved in the DT. This real issue is with the kernel hand= ling > > > 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. >=20 > Yes, we are talking about the same thing. It's not just OpenSBI not > setting no-map property in reserved memory node because other > SBI implementations would be doing the same thing (i.e. not setting > no-map property) Other SBI implementations doing the same thing doesn't make it any more correct though, right? > > > 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 i= ndicate > > > > > that this memory region is not to be saved/restored during hibern= ation. > > > > > This can be documented in RISC-V DT bindings as well as the booti= ng guide > > > > > doc that alex was talking about. > > > > > > > > Sure, a dt-binding for sbi reserved regions doesn't immediately sou= nd > > > > like an awful idea... But we still have to work around the borked > > > > firmware - be that disabling hibernation or using the mmode_resv no= de > > > > 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 f= or > > sbi reserved regions was a good idea. --OFwHiDdDsq9ntBHt Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZG9o3gAKCRB4tDGHoIJi 0gmsAQDEkuoMF0HDEcJQCW9qndjbk4bpKWaSwzgKHMvPTLClDwD/Tx9ATCMUdkIN Yr7l0UleTYU8XObDH+OTvhupiW7CAAA= =9IgR -----END PGP SIGNATURE----- --OFwHiDdDsq9ntBHt--