Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2003674lqp; Sat, 23 Mar 2024 21:07:11 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVp4TagFhSNxZ7lSrvlSqFzWxEisuTsfHhEfJIpt18T9Gue6c9PvHjpDPWcRgKos8uaAG9q/7vLWOZbypgTkWFL79JJ/pvRwatR5zZaRQ== X-Google-Smtp-Source: AGHT+IGT8ump0EvYr7Z28FhS/71cd+weB+TvB1KV0X4TaDA6ay446wVmHddM3gBVXyWqLnlvU5MI X-Received: by 2002:ac2:5dd5:0:b0:513:ed0f:36c4 with SMTP id x21-20020ac25dd5000000b00513ed0f36c4mr748989lfq.43.1711253231500; Sat, 23 Mar 2024 21:07:11 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711253231; cv=pass; d=google.com; s=arc-20160816; b=fXzekU1qLd3/ftxcqQ50D5HMlVpn8SPl6zQUtr2S7RUcBEeyWogzuiXYp1uEqEG+TX 5YUxLzNV+rOrMefOo04Z2E56dqpf7oQCO90Ihg4eJEY4WDgwLdDX2XmHXPnCQi23F7Qn z1S2WC2hfp+ojApfCUJsv7/RfFtatfrgKxNSAjaC1wc7Z4ZHx5jwUiFl+ObGdEUeoK/s kByKnOkt4PtsNRrhacGsZw6GaVFjYGLCL2UYdVR4dcs6THtei5hGkUuLKRKbwosBwiGR 8SWdovCMwZW/J1AHuhvwCQcZ+vW3eYtG92kHG/P7vrDZh1CqqHInOH1kwGtX0PxTgbJf ynwQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:sender:dkim-signature; bh=CoEoEfVFuz6mK2rsSHpUkc2k4VLzktd6pNRYNSI33vg=; fh=Bg2I+oi6Eph2sUX13HgDj/7kbZ9ifv8reZ3SlvfUxGE=; b=u1jazafIq4uc9u7k9J/9e6C98Ltof16DvGcm8GGT95s0v2IMIReL0w9g9Zx/dW7sOq 4odrILBZOM4X5wxX7XG6IGMdz7yeiygfqJkRSqrbBBUgdXRiS2+LGg2hX5nRlkxlSerJ K2z33bO5lmGC/Z43uCCe9hz+38RaQLXip5FPNFM9abP+BJVLz1wu7AueIhAcf4dilPGi xEEjVMCEPKDDTpFe8yu8/2WKMEjjUpXVdBPX3U5twIVjs/T6PDEiIcnQcjxi38N2qGxS kP2ImyMkQIcXYXE+tsJ96RdHwXZkbGOcM4lqy1j9O/0YwhO1bVJzmuOEXZ2KRRmvL3SG rYgA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=kuDNcU91; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-112579-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-112579-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id q1-20020a056402248100b005687db78a96si1327535eda.147.2024.03.23.21.07.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Mar 2024 21:07:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-112579-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=kuDNcU91; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-112579-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-112579-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 309791F2159E for ; Sun, 24 Mar 2024 04:07:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E4459B67A; Sun, 24 Mar 2024 04:07:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="kuDNcU91" Received: from mail-wr1-f48.google.com (mail-wr1-f48.google.com [209.85.221.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 697E423CE for ; Sun, 24 Mar 2024 04:07:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.48 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711253224; cv=none; b=LFeIaa5VYrfzzeavs9RULWX5gQI+EFRb/rPH325eRYtiV/HEER/yjbgpit/UvQvovn1xs2dhS/5O/UIOkTC8yup5HcId3HEsVLg6QBv39tGTGajr4QuW8nu1Q05zsWpa/ip9iNgSex3RR7acbfPcXiNVFnCnwP+aW9Vy8EjRKZc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711253224; c=relaxed/simple; bh=rtihWBQcO+f01Fp1toRH6VRZJC7RziVDNZH5AjaCfek=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=limyGw5DOs3OLZP9RpWdScOK8nUT2PNUqdGZGWwbZ5useqjL6JEpN0687/LiUCopeOmvor+adJkVpKhmpfYkrnl+M+OMglFNMMFpVoemgMrbRjwYuBanP2/t/ibBvZyHQaFfIzYvuTfaliIEOO46QDXkuiVvSsKR5F5vsSNmaWQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=kuDNcU91; arc=none smtp.client-ip=209.85.221.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wr1-f48.google.com with SMTP id ffacd0b85a97d-33ed5b6bf59so2303715f8f.0 for ; Sat, 23 Mar 2024 21:07:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711253221; x=1711858021; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:from:to:cc:subject:date:message-id :reply-to; bh=CoEoEfVFuz6mK2rsSHpUkc2k4VLzktd6pNRYNSI33vg=; b=kuDNcU91QzGP6EsiVc5rOxA05DdBN6Uld2aYCnDT3L415lTXVhJE0V0X9Kaqdok+sG l45NXvZGvmJ9GTlPmZSaAQK/jcXxN2NI9JkUmv8mFr4h1Lw/vIlNPo+62Gr54wc6Nc6o FtvUyVgHw62ujPRE/u47nIGWNHaO0c6l4A0br7AMuqF28/FQj6aZthxMIRAwMXCiTCDh 3uCwp/MlmAJpokbi5IZUL1IFOGe+Wvr67O8ONgubyNdroL28BcTGS517VATlVPgf29Np i7zIdX/CAAIgasqeuizujjo2/ek+dzDb4NeqfjbSt7gamW8Npk6xnvodYGx0sVM+Hcvq quGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711253221; x=1711858021; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=CoEoEfVFuz6mK2rsSHpUkc2k4VLzktd6pNRYNSI33vg=; b=X2+XGZrgTBrMXyiKspfkZoMpCogtmYmA/od2OwOU+4N7GzSLYagCArB6iB2ssG/rlh 7jnN66IujXD5ERRXWDG/K8l/RRdei2099D3j6fMibHMKAYeAHEvCQnftTc8PF2nhrC5H GSnPd3wbb6fwgg+AdgnKUPsQu9nvq3oLuqsZBakUalulovHdPfC+pFRNAPJ36mZ8x22h e6Ka+QoZEFTCnDmj3GSZ16uBBgrzNBOT6HExYEPjRcJx+DhRET3KrT/DuncrBrQW9lyt zQvTThr9dX7RVgzkErjtBsMSf355KDsg5xqxi07bwxVW3jCvxcZDmvnD2rE+EsYkzaYD t2FA== X-Forwarded-Encrypted: i=1; AJvYcCUz6OrBefe6wAQj8IC6RBeu8xyslyTyzymX0z1+Yf3ia0h/ZOhlYN6FZHYtYXzvYCfx961CYRLLHaOV41/Z1FkW7FtM2QNcKCGen2eS X-Gm-Message-State: AOJu0Yxqu/A1P52GvIsF7918TsQI6PuRRpkVl+czoeyd37seU4JB4mmp TwCfdpV+t0iq8POu++ec7LeyRVTY0pYIVZRf8dYu8FSnd2/ZXIIw X-Received: by 2002:a5d:6382:0:b0:33e:7aff:a3a0 with SMTP id p2-20020a5d6382000000b0033e7affa3a0mr2140376wru.71.1711253220432; Sat, 23 Mar 2024 21:07:00 -0700 (PDT) Received: from gmail.com (195-38-112-2.pool.digikabel.hu. [195.38.112.2]) by smtp.gmail.com with ESMTPSA id h2-20020a5d5042000000b00341c162a6d4sm2770501wrt.107.2024.03.23.21.06.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Mar 2024 21:06:59 -0700 (PDT) Sender: Ingo Molnar Date: Sun, 24 Mar 2024 05:06:57 +0100 From: Ingo Molnar To: Baoquan He Cc: kexec@lists.infradead.org, linux-kernel@vger.kernel.org, x86@kernel.org, akpm@linux-foundation.org, chenhuacai@loongson.cn, dyoung@redhat.com, jbohac@suse.cz, lihuafei1@huawei.com, chenhaixiang3@huawei.com Subject: Re: [PATCH] crash: use macro to add crashk_res into iomem early for specific arch Message-ID: References: <20240324033513.1027427-1-bhe@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240324033513.1027427-1-bhe@redhat.com> * Baoquan He wrote: > There are regression reports[1][2] that crashkernel region on x86_64 can't > be added into iomem tree sometime. This causes the later failure of kdump > loading. > > This happened after commit 4a693ce65b18 ("kdump: defer the insertion of > crashkernel resources") was merged. > > Even though, these reported issues are proved to be related to other > component, they are just exposed after above commmit applied, I still > would like to keep crashk_res and crashk_low_res being added into iomem > early as before because the early adding has been always there on x86_64 > and working very well. For safety of kdump, Let's change it back. > > Here, add a macro HAVE_ARCH_ADD_CRASH_RES_TO_IOMEM_EARLY to limit that > only ARCH defining the macro can have the early adding > crashk_res/_low_res into iomem. Then define > HAVE_ARCH_ADD_CRASH_RES_TO_IOMEM_EARLY on x86 to enable it. > > Note: In reserve_crashkernel_low(), there's a remnant of crashk_low_res > hanlding which was mistakenly added back in commit 85fcde402db1 ("kexec: > split crashkernel reservation code out from crash_core.c"). > > [1] > [PATCH V2] x86/kexec: do not update E820 kexec table for setup_data > https://lore.kernel.org/all/Zfv8iCL6CT2JqLIC@darkstar.users.ipa.redhat.com/T/#u > > [2] > Question about Address Range Validation in Crash Kernel Allocation > https://lore.kernel.org/all/4eeac1f733584855965a2ea62fa4da58@huawei.com/T/#u > > Signed-off-by: Baoquan He > --- > arch/x86/include/asm/crash_reserve.h | 2 ++ > kernel/crash_reserve.c | 7 +++++++ > 2 files changed, 9 insertions(+) > > diff --git a/arch/x86/include/asm/crash_reserve.h b/arch/x86/include/asm/crash_reserve.h > index 152239f95541..4681a543eba3 100644 > --- a/arch/x86/include/asm/crash_reserve.h > +++ b/arch/x86/include/asm/crash_reserve.h > @@ -39,4 +39,6 @@ static inline unsigned long crash_low_size_default(void) > #endif > } > > +# define HAVE_ARCH_ADD_CRASH_RES_TO_IOMEM_EARLY > + Any reason for that stray space? Thanks, Ingo