From nobody Tue Apr 7 09:07:18 2026 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 D307AECAAA1 for ; Fri, 2 Sep 2022 06:16:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235467AbiIBGQY (ORCPT ); Fri, 2 Sep 2022 02:16:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60366 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235465AbiIBGQV (ORCPT ); Fri, 2 Sep 2022 02:16:21 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 40A888E0CE; Thu, 1 Sep 2022 23:16:20 -0700 (PDT) Date: Fri, 02 Sep 2022 06:16:16 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1662099378; h=from:from:sender:sender:reply-to: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:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Yh5nbofxKXDkqZCw/xR+TdYjF6z3LSisPjX1xlymmF0=; b=yr/ratrtsf8EDswM9qS0PGolYp4Atn2sNTcTcpCobWNqtBUE74pQ4skmoBvjD/YYCrlARL ej7QSgq6waWLrStYBCxpSH4nXSbZj1phr0tXItN+uu5uCMCk6sXLRgUA+iP120WiFa4Nzp XF++HVx74UI5wQ5NUdruzJBxcd8Nv1/ayNoAejxPaVpZsZgj/fAT9Sd+WPThU5xoLX/yRp Se4HEy0nokcjVFgucCGcMmgrpSExZcDlD+ZEBGUl+U3Ej9kfv9mx4XAzb8VRe7mDMlhcHb IyqeZ6oUnZNVgTPhMNO0YwCDaoz1MdXT1aujOpB9CY7w18vgDrM1GCKbYjgNjA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1662099378; h=from:from:sender:sender:reply-to: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:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Yh5nbofxKXDkqZCw/xR+TdYjF6z3LSisPjX1xlymmF0=; b=hi5+w0JHOCaR643UN4rj1mc44DFnesXEUZ1Ugwl1ibW45EHcEcpkkfZVO1ZrRyTROdW/Ey ePKUBfqdg0PDbRCw== From: "tip-bot2 for Ashok Raj" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/microcode] x86/microcode: Print previous version of microcode after reload Cc: Ashok Raj , Borislav Petkov , Tony Luck , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20220829181030.722891-1-ashok.raj@intel.com> References: <20220829181030.722891-1-ashok.raj@intel.com> MIME-Version: 1.0 Message-ID: <166209937647.401.14402365682473849794.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the x86/microcode branch of tip: Commit-ID: 7fce8d6eccbc31a561d07c79f359ad09f0424347 Gitweb: https://git.kernel.org/tip/7fce8d6eccbc31a561d07c79f359ad09f= 0424347 Author: Ashok Raj AuthorDate: Mon, 29 Aug 2022 18:10:30=20 Committer: Borislav Petkov CommitterDate: Fri, 02 Sep 2022 08:01:58 +02:00 x86/microcode: Print previous version of microcode after reload Print both old and new versions of microcode after a reload is complete because knowing the previous microcode version is sometimes important from a debugging perspective. [ bp: Massage commit message. ] Signed-off-by: Ashok Raj Signed-off-by: Borislav Petkov Acked-by: Tony Luck Link: https://lore.kernel.org/r/20220829181030.722891-1-ashok.raj@intel.com --- arch/x86/kernel/cpu/microcode/core.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/x86/kernel/cpu/microcode/core.c b/arch/x86/kernel/cpu/mic= rocode/core.c index ad57e0e..6a41cee 100644 --- a/arch/x86/kernel/cpu/microcode/core.c +++ b/arch/x86/kernel/cpu/microcode/core.c @@ -491,7 +491,7 @@ wait_for_siblings: */ static int microcode_reload_late(void) { - int ret; + int old =3D boot_cpu_data.microcode, ret; =20 pr_err("Attempting late microcode loading - it is dangerous and taints th= e kernel.\n"); pr_err("You should switch to early loading, if possible.\n"); @@ -503,7 +503,8 @@ static int microcode_reload_late(void) if (ret =3D=3D 0) microcode_check(); =20 - pr_info("Reload completed, microcode revision: 0x%x\n", boot_cpu_data.mic= rocode); + pr_info("Reload completed, microcode revision: 0x%x -> 0x%x\n", + old, boot_cpu_data.microcode); =20 return ret; }