From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 02399C52D6D for ; Tue, 6 Aug 2024 08:12:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To: Content-Transfer-Encoding:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=FHO1YRd7Z5qSKKfdGtZUE/raKHBQn9k3mnGPYA/b5zE=; b=i4BalsFWAcVeEgS3BZqFGCa3pK fwD0guy74lxVz9z+CD3lQLD3KF87KqcCxkkzaloqqnab06V+YKDT4+L7Iyo4LrJDNeoIILscbEbep NQFsuZ7q1vC0q3dLf2Pq06Jv9JAwIyyQ5f4lJTY6Jz+UVApcrAnO+NZeIxKu+KN186+lMV63XxULT RgIl4Coh98/JzTzgI+uYniGIp5PGx7SJfw1/XVZM8nMM3tAviDYR1hPswQk0ErBRtihq3V60sAXtJ XWevWyp+Cgc8HAEcI8/OdG4fsinPntEuGu5HbF2l1Gl02d9GtQZqkD//na8TmWnQuueVCEH08Lkc9 xx7H/v5w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sbFIu-00000000tot-1NCy; Tue, 06 Aug 2024 08:12:24 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sbFIN-00000000thx-2aBE for linux-arm-kernel@lists.infradead.org; Tue, 06 Aug 2024 08:11:52 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1722931909; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FHO1YRd7Z5qSKKfdGtZUE/raKHBQn9k3mnGPYA/b5zE=; b=g1TP30okZUUeur/glXCdgHnabYMe/Zfsc33T5VL4tD7WwaPloTD3eZ1ySikWa82yYAxb/c g+kNQJcGiv+pmGbk/t74D458CXM02vued8ogCfQyMnAkon4a3Zk9kKkAGydjBMu2mj2Q1c rNCh3szySMO9jGlr/GqPNxIKl+XG3v0= Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-463-yesapWGmOAuHxFvULAbdHg-1; Tue, 06 Aug 2024 04:11:44 -0400 X-MC-Unique: yesapWGmOAuHxFvULAbdHg-1 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 500631955BFC; Tue, 6 Aug 2024 08:11:42 +0000 (UTC) Received: from localhost (unknown [10.72.112.21]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id A3B011956046; Tue, 6 Aug 2024 08:11:40 +0000 (UTC) Date: Tue, 6 Aug 2024 16:11:30 +0800 From: Baoquan He To: Jinjie Ruan Cc: "Russell King (Oracle)" , akpm@linux-foundation.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH] ARM: Support allocating crashkernel above 4G for LPAE Message-ID: References: <20240802092510.3915986-1-ruanjinjie@huawei.com> <6c0a45c3-08a2-f889-9e66-ab8aff66ae8c@huawei.com> <8f051483-46be-87b6-03bb-5e0d145a2ac3@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <8f051483-46be-87b6-03bb-5e0d145a2ac3@huawei.com> X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240806_011151_759571_F9F677E6 X-CRM114-Status: GOOD ( 30.35 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 08/06/24 at 10:46am, Jinjie Ruan wrote: > > > On 2024/8/5 10:56, Baoquan He wrote: > > On 08/05/24 at 09:23am, Jinjie Ruan wrote: > >> > >> > >> On 2024/8/2 19:01, Russell King (Oracle) wrote: > >>> On Fri, Aug 02, 2024 at 05:25:10PM +0800, Jinjie Ruan wrote: > >>>> As ARM LPAE feature support accessing memory beyond the 4G limit, define > >>>> HAVE_ARCH_CRASHKERNEL_RESERVATION_HIGH macro to support reserving crash > >>>> memory above 4G for ARM32 LPAE. > >>>> > >>>> No test because there is no LPAE ARM32 hardware. > >>> > >>> Why are you submitting patches for features you can't test? > >>> > >>> I'm not going to apply this without it being properly tested, because I > >>> don't believe that this will work in the generic case. > >>> > >>> If the crash kernel is located in memory outside of the lower 4GiB of > >>> address space, and there is no alias within physical address space > >>> for that memory, then there is *no* *way* for such a kernel to boot. > >> > >> I'm sorry that I released this patch without testing it. I actually > >> intended to bring up this issue for discussion. If anyone has the > >> environment to test it, that would be great. In the meantime, we could > >> have a discussion on the significance and relevance of this approach. > > > > I don't know arm32 and its LPAE. I know a little about x86_32 where > > crashkernel can only be reserved below 896M because of the virtual > > memory layout, and all memory above that is high memory which can't be > > used as kernel memory directly. So from this patch, arm32 is different > > than x86_32. > > Hi,Baoquan > > Does the following code make sense? Now parse_crashkernel() use > HAVE_ARCH_CRASHKERNEL_RESERVATION_HIGH macro to parse "high", but use > CONFIG_64BIT when reserving "low" memory in reserve_crashkernel_low(). I am fine with it. BUT have you addressed Russell's concern, e.g how to test it actually? > > And when LPAE is enabled in ARM32, and "high" is reserved, > reserve_crashkernel_low() need also function ok. > > --- a/kernel/crash_reserve.c > +++ b/kernel/crash_reserve.c > @@ -354,7 +354,7 @@ early_param("crashkernel", parse_crashkernel_dummy); > #ifdef CONFIG_ARCH_HAS_GENERIC_CRASHKERNEL_RESERVATION > static int __init reserve_crashkernel_low(unsigned long long low_size) > { > -#ifdef CONFIG_64BIT > +#ifdef HAVE_ARCH_CRASHKERNEL_RESERVATION_HIGH > unsigned long long low_base; > > > > > >> > >>> > >>> So, right now I believe this patch to be *fundamentally* wrong. > >>> > >> > > > > >