Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp3486530pxb; Tue, 19 Apr 2022 03:47:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy7RDDs/Sg/lFWDzjHiRgCPtDWOA7uJsGSxC/ailqsPGZ1N25Y3S+EZG/NVLS+FSExO+kEp X-Received: by 2002:a17:90b:1e49:b0:1d2:9d82:8bb1 with SMTP id pi9-20020a17090b1e4900b001d29d828bb1mr10069015pjb.226.1650365237889; Tue, 19 Apr 2022 03:47:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650365237; cv=none; d=google.com; s=arc-20160816; b=Q7BzBgF6J8hpzk1LUhlr53hv/8VQaAAmG7L9Cx9QKgPtoh/t4gk49dKUtBrp3eN9MY PkZCsQakmnY3/4EupN37j+rcXkicFyqUD3x9cjS/WbI7/HI9Y4UFmWyEzc0Ft2nvc9Xe NxgLFLJM4/1oHJ+vlLCZMJsQ5McoO/7ohP3KU7owpjViF26ILmFDHX9q60krzL9RUWDB 1lMJSI3o9FhEbKCJKAbJcNGkvoC8aZ09b7IMsYbWdoEZ3HN8nBs3HELTh7of3QOzrvHy 1Iff28kWI7OVbxS8RpF2hNJTqnW1ua9IagyWSthA9UdWoAJk/G/SixwYjDytkrYPWM2L R7NA== 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=+C400UB/aegXad3nw2fevgP3gS1wreNSifnBkwtUuq0=; b=bkSSkb8+fA8kwitY5n0A8Tn8L1E2LpgrHo/VhCMIFyBDe2GYdLnT9TNSgQWjzfhusK fTt81M8qSWSydWhRM1nkX8tRwblQxCVER3dLdDJmWQVZwIuWKkoTaGFqwSP8IklRiP3K NyP46Twe6lCeVMyYqKcOkgft9y3aEpi5WkmTsvCQSsS/wt23PoEgA7BCnrPxl4GovWNo F7U46vO/lnwfQD4e16AQJ0+FlYJ7k2bKBJy6RTgW15e2ETPjVeq5CZcRyAHMgckHL5YN pVAGVgD+uRHX9E6gVhJ5EJ5cGuG18uujAQcOOFoKnFDSPFLTWwu8pLF0HG3govuctiJD bAaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b="EFN+/+9+"; 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 d128-20020a636886000000b003816043efc7si10939004pgc.444.2022.04.19.03.47.03; Tue, 19 Apr 2022 03:47:17 -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="EFN+/+9+"; 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 S238373AbiDSKfS (ORCPT + 99 others); Tue, 19 Apr 2022 06:35:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37516 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232153AbiDSKfP (ORCPT ); Tue, 19 Apr 2022 06:35:15 -0400 Received: from mail.skyhub.de (mail.skyhub.de [5.9.137.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CBA0829CB2 for ; Tue, 19 Apr 2022 03:32:33 -0700 (PDT) Received: from zn.tnic (p200300ea971b58fe329c23fffea6a903.dip0.t-ipconnect.de [IPv6:2003:ea:971b:58fe: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 416CF1EC0426; Tue, 19 Apr 2022 12:32:28 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1650364348; 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=+C400UB/aegXad3nw2fevgP3gS1wreNSifnBkwtUuq0=; b=EFN+/+9+gvjDdebSzdoqGtAviwSkUfNJzNwajmoxtrtEgL4NFpMQD6YrUOLSddjwlkc4IJ 8s2t2L0nNRL3MUpAKg9MFV34t/m3MOzP0PMgrp9B9rDyk+BfDLnTSZl/7AjWGiGKHjdHFX Lcyh7drFh17eb/VAF5IdJepW98t6UZk= Date: Tue, 19 Apr 2022 12:32:25 +0200 From: Borislav Petkov To: Eric DeVolder Cc: 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, david@redhat.com, konrad.wilk@oracle.com, boris.ostrovsky@oracle.com Subject: Re: [PATCH v7 2/8] x86/crash: Introduce new options to support cpu and memory hotplug Message-ID: References: <20220413164237.20845-1-eric.devolder@oracle.com> <20220413164237.20845-3-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, T_SCC_BODY_TEXT_LINE 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 Mon, Apr 18, 2022 at 05:03:39PM -0500, Eric DeVolder wrote: > I've examined the code with this thought in mind, and I'm not exactly sure how > this code should be restructured for !HOTPLUG stubs. I'd very much appreciate > an example in order to facilitate accommodating the request! For example, see init_intel_microcode() in arch/x86/include/asm/microcode.h: #ifdef CONFIG_MICROCODE_INTEL extern struct microcode_ops * __init init_intel_microcode(void); #else static inline struct microcode_ops * __init init_intel_microcode(void) { return NULL; } #endif /* CONFIG_MICROCODE_INTEL */ The actual definition then is in: arch/x86/kernel/cpu/microcode/intel.c: struct microcode_ops * __init init_intel_microcode(void) and it gets enabled when CONFIG_MICROCODE_INTEL is enabled in the .config. When CONFIG_MICROCODE_INTEL=n, the static inline stub gets used and optimized away by the compiler. HTH. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette