From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8AC56C47089 for ; Mon, 5 Dec 2022 16:25:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231880AbiLEQZ0 (ORCPT ); Mon, 5 Dec 2022 11:25:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49824 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231883AbiLEQZY (ORCPT ); Mon, 5 Dec 2022 11:25:24 -0500 Received: from mail.skyhub.de (mail.skyhub.de [5.9.137.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1F14A1DDE9 for ; Mon, 5 Dec 2022 08:25:23 -0800 (PST) Received: from zn.tnic (p200300ea9733e72f329c23fffea6a903.dip0.t-ipconnect.de [IPv6:2003:ea:9733:e72f: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 ADE5D1EC0674; Mon, 5 Dec 2022 17:25:21 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1670257521; 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=u/8q7IKW2/01CTBav2jPOwHr2XBf6TJfCZXjOCyErE0=; b=LJEbfxJg4EX5NT7mZBZ29X7gc/20e8bCJ8TryrYd/etq4n/YKZHzGoRIQ/74+sB8byPsms DT0MvV8fpK0sBDa1OIktH4Id8l98lK7/KXKhyDLNF222qC9pLgoD38OY80z6GjnBmGrz/Q yCnxRt0vZ1EDKD41hSbNO6dczj3dO+Y= Date: Mon, 5 Dec 2022 17:25:17 +0100 From: Borislav Petkov To: Ashok Raj Cc: X86-kernel , LKML Mailing List , Dave Hansen , Tony Luck , alison.schofield@intel.com, reinette.chatre@intel.com Subject: Re: [Patch V1 3/7] x86/microcode/core: Move microcode_check() to cpu/microcode/core.c Message-ID: References: <20221129210832.107850-1-ashok.raj@intel.com> <20221129210832.107850-4-ashok.raj@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20221129210832.107850-4-ashok.raj@intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 29, 2022 at 01:08:28PM -0800, Ashok Raj wrote: > microcode_check() is only called from microcode/core.c. Move it and make > it static to prepare for upcoming fix of false negative when checking CPU > features after a microcode update. So this function is there in cpu/common.c because it uses CPU facilities like cpuinfo_x86 and get_cpu_cap() so the logical place was there. So that I don't have to export a bunch of things but rather have the microcode loader call into it only. Your next patch is using more of those CPU-specific facilities so "bleeding" them into the microcode loader looks like the wrong way around. get_cpu_cap() deals with all those c->x86_capability arrays and other functions which do that, should be there too. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette