Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1442588yba; Tue, 2 Apr 2019 08:58:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqyU4s4xYqN/w25SfJcqX3MOHvbMdkGAWwVeUbjW+AB9x4LIvJunLa+xs5/cE6cv34+oMQj9 X-Received: by 2002:a17:902:2848:: with SMTP id e66mr1824917plb.181.1554220706912; Tue, 02 Apr 2019 08:58:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554220706; cv=none; d=google.com; s=arc-20160816; b=EoHXTpX6HhS61dIwnRK4xvry0/1O+zx46xGVi6ufILYeu4u3hulJ8XpMkVLe3UVRm1 lRWe9GDmedbSw/ZiNeJiFqVJ3tQFRE7M8Or878gdYNInEmoC7TyxkCFfu/c2g9UYvnVY WB7w4k7LqtfHcGsNmsSrJYOH4nXnUiCoj6bqrfdg51X3oKVElcMSqKdniU/q70RAUjWF 58jJBBl0iZ/v9zP4k4XjrzoxiwQnSkrvwPA7h3LGlBYkhhqltiUJ0Mpmiw+ApqAsvEgf rHIqDwQW1q8tpn/vBD9PL7wruFz1RuJ+0X3UI+QKB/1yGKfqy7OesB9KoqGQ6QosWVzR EkFA== 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:dkim-signature; bh=ieVjFeckjXBOmqsPZW4XPAx/TTZtkTXGrwcqGTz35Is=; b=gS7rnQ/sBIrJY0I64mEQSniqrgKkLcKb/KYsHi/Ft0kDS1OExdMvuaKUttBMarOJxA u+wU1mFd1wMNllZnF0rIiwKhyLX4Bl1CTyHjUG2hmpoUZmrusewY/VUx8tubJwn9XTZ3 FAju6GfEp+dKv8QDBThM8r9M345h4jJMKpMKfs0stxTdj+oZRqjf/rBSMTRzuFQJKD80 Afhg5/M0mCrTzccM+eqeQSIO0c0qIFg5aDrfBCUS1DrpSFO2E050rsYT9ZwR1IOdojvl SNxf+Oo+BbeKg/UxCWKPb5kPMcqiYPaJwbFYgLEf6qUXqVoKkIZv7oTkNPJsIMHo9izB OJtw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=iheBTqAC; 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=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g20si11754631pfg.207.2019.04.02.08.58.11; Tue, 02 Apr 2019 08:58:26 -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; dkim=pass header.i=@alien8.de header.s=dkim header.b=iheBTqAC; 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=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729836AbfDBPfb (ORCPT + 99 others); Tue, 2 Apr 2019 11:35:31 -0400 Received: from mail.skyhub.de ([5.9.137.197]:55892 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725920AbfDBPfa (ORCPT ); Tue, 2 Apr 2019 11:35:30 -0400 Received: from zn.tnic (p200300EC2F148A00329C23FFFEA6A903.dip0.t-ipconnect.de [IPv6:2003:ec:2f14:8a00: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 009021EC023E; Tue, 2 Apr 2019 17:35:28 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1554219329; 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=ieVjFeckjXBOmqsPZW4XPAx/TTZtkTXGrwcqGTz35Is=; b=iheBTqAC/chqNxSA1uY+LbAwGansJDWG5jKTqWQjlFA3Md/8tKgEgYsQkepMPyW9mjwL9+ F7iinTAH6ol6aWexRxQAa7hf2WwcNbpT1Gle11MVeTwwHZqB74q/enn7fyY/b/7pUnb4dX +4hxuq+KIR/MHDk3Hk/BG9zw8Lm6+E0= Date: Tue, 2 Apr 2019 17:35:24 +0200 From: Borislav Petkov To: Zhenzhong Duan Cc: linux-kernel@vger.kernel.org, x86@kernel.org, Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Srinivas Eeda Subject: Re: [PATCH] x86/microcode: Remove useless code after early microcode support added Message-ID: <20190402153524.GH6826@zn.tnic> References: <1554108412-22229-1-git-send-email-zhenzhong.duan@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1554108412-22229-1-git-send-email-zhenzhong.duan@oracle.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 01, 2019 at 04:46:52PM +0800, Zhenzhong Duan wrote: > After early microcode update was added, microcode couldn't be configured No, early loading doesn't have anything to do with it - the driver was made built-in only. > as a module, microcode update happens at early bootup and cpu hotplug > stage. This made the microcode update code in module loading stage > useless. > > This patch Avoid having "This patch" or "This commit" in the commit message. It is tautologically useless. Also, do $ git grep 'This patch' Documentation/process for more details. > remove the useless code. Well, not useless. 1. Apply your patch, boot kernel without an initrd so that it doesn't apply early microcode. 2. Load late microcode: # echo 1 > /sys/devices/system/cpu/microcode/reload [ 66.430052] microcode: CPU0: new patch_level=0x05000029 [ 66.430352] x86/CPU: CPU features have changed after loading microcode, but might not take effect. [ 66.430620] microcode: Reload completed, microcode revision: 0x5000029 3. # grep microcode /proc/cpuinfo microcode : 0x5000029 microcode : 0x5000028 <--- !!! Whoops. CPU1 didn't get updated. So I'd suggest leaving this code alone and concentrating on fixing real bugs. Unless it is causing other issues. -- Regards/Gruss, Boris. Good mailing practices for 400: avoid top-posting and trim the reply.