Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp4054333rwb; Fri, 30 Sep 2022 12:06:32 -0700 (PDT) X-Google-Smtp-Source: AMsMyM58wvCV4pO0ioIHQNt6gyj7VLQXzRWiZwVLb7qncgliP+eoISpWoN+mUgn+dNQ0OFrBs/aE X-Received: by 2002:a17:907:9493:b0:787:c346:19a4 with SMTP id dm19-20020a170907949300b00787c34619a4mr7405095ejc.235.1664564791688; Fri, 30 Sep 2022 12:06:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664564791; cv=none; d=google.com; s=arc-20160816; b=pEBb0Kzxjl7tyMFH5OvjBaSJb4FgNeS8tD1Gcu3i+W4NPwleFy4Xx84A6g/r+uD10G V9SqvDC5o/v/dkS2w+GD6cpsqF6GjEGf7rgVpWlwDtbMimUKm2IYJJ6oS7Gv0rMBHacx O5P30CcvBP9HVtOAy0qy0V0+M2ZScReSX4Bpu7fQ29z037ljNiOgbCbW4yDd+W2DjaYT Kc9ZrlM8E7Zqho439GlBpcWIxkrQZ/+afqehMMz0N4glcQMFnidy7OGhr/uBMM62IsfA scdJ+ULYXX0LcC6irJVULiHjAInQtff/FUeI/SNLeQ6g1hs9LK3bSGUGnid8JCooqPtk XtYw== 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=rPlsW5KXga8GPT52DXx9hd1bxPky9/DpS45uUaF1jqQ=; b=hJA0QpsRzsZ7IcuhG0osoiAuVqT8R+YGn/SSqqtzqLMMxUSWFQEf+tSCjXvw1VZmA4 lSA+upHS4MJM8lTqI0Zy+Xxjd3Nmie9vq6U3qkNbgGQnYCV2ZOZTBk/FnfaZWouiXgQr 4WIeB7RAVCgMaMSFflA9LFK3s81vpTozor4LRd8YsOjsCehN0Fl6R834/JeFrDloASkk 6R77BD3SzUIGOqub6f+/PamN7Jfop1oMreTb9so1p1TPqGkvzsBSrapULkh1se0zNbHG TokU1kHyEVuzDXSZJI9aSLfI2RUB7Et7ElFTw7P8faGG7Q1DV5DojafAONYFZB7KB7sL XIIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=LAMPYyFU; 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=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hd40-20020a17090796a800b00731468ef97esi2480100ejc.31.2022.09.30.12.06.05; Fri, 30 Sep 2022 12:06:31 -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=@alien8.de header.s=dkim header.b=LAMPYyFU; 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=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231548AbiI3Rkp (ORCPT + 99 others); Fri, 30 Sep 2022 13:40:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51914 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229892AbiI3Rkm (ORCPT ); Fri, 30 Sep 2022 13:40:42 -0400 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 73B54E2B8D for ; Fri, 30 Sep 2022 10:40:41 -0700 (PDT) Received: from zn.tnic (p200300ea9733e70a329c23fffea6a903.dip0.t-ipconnect.de [IPv6:2003:ea:9733:e70a:329c:23ff:fea6:a903]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id EE81F1EC01CE; Fri, 30 Sep 2022 19:40:35 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1664559636; 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:in-reply-to:in-reply-to: references:references; bh=rPlsW5KXga8GPT52DXx9hd1bxPky9/DpS45uUaF1jqQ=; b=LAMPYyFU5/elnJA6eLDIg0hj/h8ekXQ+HIwqaG5hORiAdOY3BXtgD2dOu4EWezSox6Kfu4 cuuNrlmnypVPqorNFf45jNS+fzd5mpIvfODZpSEW+KyeqJhlSqdYQlDu8P8BCxaqaOSm13 7DNGh8ICOnqiSTOkxmKCmlRCNRD/iVk= Date: Fri, 30 Sep 2022 19:40:35 +0200 From: Borislav Petkov To: Eric DeVolder Cc: Oscar Salvador , Andrew Morton , david@redhat.com, linux-kernel@vger.kernel.org, x86@kernel.org, kexec@lists.infradead.org, ebiederm@xmission.com, dyoung@redhat.com, bhe@redhat.com, vgoyal@redhat.com, tglx@linutronix.de, mingo@redhat.com, dave.hansen@linux.intel.com, hpa@zytor.com, nramas@linux.microsoft.com, thomas.lendacky@amd.com, robh@kernel.org, efault@gmx.de, rppt@kernel.org, sourabhjain@linux.ibm.com, linux-mm@kvack.org Subject: Re: [PATCH v12 7/7] x86/crash: Add x86 crash hotplug support Message-ID: References: <20220909210509.6286-1-eric.devolder@oracle.com> <20220909210509.6286-8-eric.devolder@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS 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 On Fri, Sep 30, 2022 at 12:11:26PM -0500, Eric DeVolder wrote: > There is of course a way to enumerate the memory regions in use on the > machine, that is not what this code needs. In order to compute the maximum > buffer size needed (this buffer size is computed once), the count of the > maximum number of memory regions possible (even if not currently in use) is > what is needed. Isn't that max number documented somewhere in memory hotplug docs? Because then you don't need that Kconfig item either. Imagine you're a distro kernel distributor and you want crash to work on all machines your kernel works. So you go and set that number to max. And that would be the 99% of the kernel configs out there. Which means, you can just set it to max without a Kconfig item. > Oh, that would be an error of haste on my part. This should be: > depends on CRASH_DUMP && MEMORY_HOTPLUG You need a Kconfig item which enables all this gunk as MEMORY_HOTPLUG is not a omnipresent feature. And that Kconfig item should depend on the other Kconfig items of the technology you need. > Baoquan pointed me to: > > https://lore.kernel.org/lkml/cover.1656659357.git.naveen.n.rao@linux.vnet.ibm.com/T/ In that thread says: "- arch_kexec_apply_relocations_add() is only overridden by x86 and s390. Retain the function prototype for those and move the weak implementation into the header as a static inline for other architectures." So yes, that's even better. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette