Received: by 2002:a25:86ce:0:0:0:0:0 with SMTP id y14csp1720680ybm; Tue, 21 May 2019 20:14:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqwY9vuuLquqqzpQYN/x0MW/wTkLcNdyKk4oQVPeG0m16S/MCV+bIBF/4r1VxNJN9r4zrlHg X-Received: by 2002:a63:c106:: with SMTP id w6mr3117997pgf.422.1558494854180; Tue, 21 May 2019 20:14:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558494854; cv=none; d=google.com; s=arc-20160816; b=AVU8UQpCUKrZKI4/OEH7O00DT7U4xZNF35IB3ERVcddDBvJLARkqMt98mdof+UTRwL 4rEKLN+LeiOaKaon5XRHOjEIc90KDGC712FHR9TauWNuETJ9q/Cse0R7vJYrPHMyG1ql Q3viyRn6+gcv8+q918BLFD/1HT47BTyjQKmrrFEmXtTDLnhAXt6as+sWUabjl/QWYRLm 7PlSI0J6aW/oO9aXVfGZZAxycVl+8HQCWeN76TuZfCwLSui/Od+HOruSE1iP528hrxuk ZEMF6coKEqa+zrrdLWkA9dofLF+9IDVx44IDtz5xNfAu0xZv1cJOwsjjT7c4/oXewYH/ 3BWg== 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=Bte97k32OGk6INRaTCda2jA+aHNnOpiqhFdwAXpQ4S8=; b=w4OWTueasJIr8/LbAEL16ex2SIhKWX3CcqpErNYhKfISgIvJpPQ/pwTE3xeMXqCOtf EnLkJqWZK/49SyMxCsEFy6c5cRNt4c5sxpu+qlFpdfLMuodr8zqtFUGjc5DdTvgR+Oq0 2eznuo4IGS+l6oyXgg8x8xlrzAu3Fk2D1hqoNmI6GINnnVvqBiBfjkGvsPpOCq0WqesC Y8g3xZydN/FinndUbBRCwqsR/dXd1s/hcSqFT3ilpGe0t53UG5uteEwxskldtk+q0kQf ffbT+8eHaPE5QJ2/S+dAFQVXfieD+7DoBudQo70uAWTLIY78dR32aXl38AHXI8ZXJF/F OYHQ== 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 t8si6381172pgh.235.2019.05.21.20.13.46; Tue, 21 May 2019 20:14:14 -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 S1728210AbfEVDLm (ORCPT + 99 others); Tue, 21 May 2019 23:11:42 -0400 Received: from mx1.redhat.com ([209.132.183.28]:13641 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727930AbfEVDLl (ORCPT ); Tue, 21 May 2019 23:11:41 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 50E4333025F; Wed, 22 May 2019 03:11:41 +0000 (UTC) Received: from dhcp-128-65.nay.redhat.com (ovpn-12-78.pek2.redhat.com [10.72.12.78]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2B5311001DED; Wed, 22 May 2019 03:11:36 +0000 (UTC) Date: Wed, 22 May 2019 11:11:33 +0800 From: Dave Young To: Baoquan He 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: <20190522031133.GA31269@dhcp-128-65.nay.redhat.com> References: <20190509013644.1246-1-bhe@redhat.com> <20190509013644.1246-4-bhe@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190509013644.1246-4-bhe@redhat.com> User-Agent: Mutt/1.11.3 (2019-02-01) X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Wed, 22 May 2019 03:11:41 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 ? > > 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