Received: by 2002:a25:86ce:0:0:0:0:0 with SMTP id y14csp1723445ybm; Tue, 21 May 2019 20:18:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqyAuXENzbzRuZOEt0H7Xjs0Y4rf5IimVZ0KIXiOsAzynh2VqOSmdJ75Np6fQibcZJBtgxkB X-Received: by 2002:a63:4346:: with SMTP id q67mr86900760pga.241.1558495117791; Tue, 21 May 2019 20:18:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558495117; cv=none; d=google.com; s=arc-20160816; b=kZ5XRoNHyYtV0fw1YePUjHSRdnIc/nsc1dBz1St1lJeVavxITpZ2Pl4i5Hfalj7nKc pMTnUMOcxCRY+RVJUsyG5v0M9NfLdBdw6Xcpdl1MkKnu3vxxiwwfvP7sIYiCA4aXxa8U /vai8DcT3Jvd4dFVGeFwybOrUCanAOjPODR9Q2pcDHoma/J3ba7kXDjIIB5clCZqxANi /mjXkWd4v7AiYShKA+64g4e3bbYP3Wk2b59lmWpjBPhs3IdjGrq/gJMAsI/8bRpSMvkr DmqiP/z5x8OKGwzt05OTUGjnpikpojaz1i3z82WobyIk6/omKrhmI9Zo5075QZ3Z1vfi vgpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=+QRQBo+Fpx6XU92X98rx+0TfMos8AyvztjrX6yRz2wY=; b=eVveJHd2NoHaWJt0ICdjLL1KIK1kViSY1DY8Kw21eN/rpdmzOtHkpqEmjmF3X4OO0D aaFBenLqJNAylJ2HBMjHvDNDDhDhJeQ415Vu1Co1WLlwQpnxlAirKSd8Uk4w3wDy7RR/ mkChZaZCFWHf+2HgRg1Eb80jI9PiHaC/uz2vRxt8I9nGBXZAqQX186VmiqMKJsJ82rS9 F3UjttXgQFzZw2u1b/+dchGsJVZGMPUi8wE0EbTeCeJDhIJfbZFZWIQPGXtsjq5SBBBI M4fK/P/Q+VEhZpoKnsdzZ4vN67xRKQgHKLar6NfZNWidiEmkokWxoIhBGBCdYJMfUFeG FKqg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id cl12si6509100plb.7.2019.05.21.20.18.22; Tue, 21 May 2019 20:18:37 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728424AbfEVDPa (ORCPT + 99 others); Tue, 21 May 2019 23:15:30 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55744 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727930AbfEVDP3 (ORCPT ); Tue, 21 May 2019 23:15:29 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 13E0B308A963; Wed, 22 May 2019 03:15:29 +0000 (UTC) Received: from localhost (ovpn-12-45.pek2.redhat.com [10.72.12.45]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 76C3B6012E; Wed, 22 May 2019 03:15:26 +0000 (UTC) Date: Wed, 22 May 2019 11:15:23 +0800 From: Baoquan He To: Dave Young Cc: linux-kernel@vger.kernel.org, tglx@linutronix.de, mingo@kernel.org, bp@alien8.de, hpa@zytor.com, kirill.shutemov@linux.intel.com, x86@kernel.org Subject: Re: [PATCH v4 3/3] x86/kdump/64: Change the upper limit of crashkernel reservation Message-ID: <20190522031523.GB3805@MiWiFi-R3L-srv> References: <20190509013644.1246-1-bhe@redhat.com> <20190509013644.1246-4-bhe@redhat.com> <20190522031133.GA31269@dhcp-128-65.nay.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190522031133.GA31269@dhcp-128-65.nay.redhat.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.41]); Wed, 22 May 2019 03:15:29 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/22/19 at 11:11am, Dave Young wrote: > Hi Baoquan, > > A few nitpicks, otherwise > Acked-by: Dave Young > > On 05/09/19 at 09:36am, Baoquan He wrote: > > Restrict kdump to only reserve crashkernel below 64TB. > > > > The reaons is that the kdump may jump from 5-level to 4-level, and if > > the kdump kernel is put above 64TB, then the jumping will fail. While the > > 1st kernel reserves crashkernel region during bootup, we don't know yet > > which kind of kernel will be loaded after system bootup, 5-level kernel > > or 5-level kernel. > > 5-level kernel or 4-level kernel ? Right, it's typo. Should be '5-level kernel or 4-level kernel'. Thanks. Will update. > > > > Signed-off-by: Baoquan He > > Acked-by: Kirill A. Shutemov > > --- > > arch/x86/kernel/setup.c | 17 ++++++++++++++--- > > 1 file changed, 14 insertions(+), 3 deletions(-) > > > > diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c > > index 905dae880563..efb0934a46f6 100644 > > --- a/arch/x86/kernel/setup.c > > +++ b/arch/x86/kernel/setup.c > > @@ -452,15 +452,26 @@ static void __init memblock_x86_reserve_range_setup_data(void) > > #define CRASH_ALIGN SZ_16M > > > > /* > > - * Keep the crash kernel below this limit. On 32 bits earlier kernels > > - * would limit the kernel to the low 512 MiB due to mapping restrictions. > > + * Keep the crash kernel below this limit. > > + * > > + * On 32 bits earlier kernels would limit the kernel to the low > > + * 512 MiB due to mapping restrictions. > > + * > > + * On 64bit, old kexec-tools need to be under 896MiB. The later > > + * supports to put kernel above 4G, up to system RAM top. Here > > Above two lines are not reflected in code because we have removed > the 896M limitation, it would be better to drop the two lines to > avoid confusion. > > > + * kdump kernel need be restricted to be under 64TB, which is > > + * the upper limit of system RAM in 4-level paing mode. Since > > + * the kdump jumping could be from 5-level to 4-level, the jumping > > + * will fail if kernel is put above 64TB, and there's no way to > > + * detect the paging mode of the kernel which will be loaded for > > + * dumping during the 1st kernel bootup. > > */ > > #ifdef CONFIG_X86_32 > > # define CRASH_ADDR_LOW_MAX SZ_512M > > # define CRASH_ADDR_HIGH_MAX SZ_512M > > #else > > # define CRASH_ADDR_LOW_MAX SZ_4G > > -# define CRASH_ADDR_HIGH_MAX MAXMEM > > +# define CRASH_ADDR_HIGH_MAX (64UL << 40) > > Maybe add a new macro in sizes.h like SZ_64T > > > #endif > > > > static int __init reserve_crashkernel_low(void) > > -- > > 2.17.2 > > > > Thanks > Dave