forked from rpms/kernel
50 lines
1.7 KiB
Diff
50 lines
1.7 KiB
Diff
From bdaca71f1e3ffeea24c2a02d4eb21879d4dece96 Mon Sep 17 00:00:00 2001
|
|
From: Ashok Raj <ashok.raj@intel.com>
|
|
Date: Mon, 29 Aug 2022 18:10:30 +0000
|
|
Subject: [PATCH 08/36] 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 <ashok.raj@intel.com>
|
|
Signed-off-by: Borislav Petkov <bp@suse.de>
|
|
Acked-by: Tony Luck <tony.luck@intel.com>
|
|
Link: https://lore.kernel.org/r/20220829181030.722891-1-ashok.raj@intel.com
|
|
(cherry picked from commit 7fce8d6eccbc31a561d07c79f359ad09f0424347)
|
|
Signed-off-by: Mridula Shastry <mridula.c.shastry@oracle.com>
|
|
Reviewed-by: Todd Vierling <todd.vierling@oracle.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/microcode/core.c
|
|
index 44bac17304ac..6affa814699d 100644
|
|
--- a/arch/x86/kernel/cpu/microcode/core.c
|
|
+++ b/arch/x86/kernel/cpu/microcode/core.c
|
|
@@ -511,7 +511,7 @@ wait_for_siblings:
|
|
*/
|
|
static int microcode_reload_late(void)
|
|
{
|
|
- int ret;
|
|
+ int old = boot_cpu_data.microcode, ret;
|
|
|
|
pr_err("Attempting late microcode loading - it is dangerous and taints the kernel.\n");
|
|
pr_err("You should switch to early loading, if possible.\n");
|
|
@@ -523,7 +523,8 @@ static int microcode_reload_late(void)
|
|
if (ret > 0)
|
|
microcode_check();
|
|
|
|
- pr_info("Reload completed, microcode revision: 0x%x\n", boot_cpu_data.microcode);
|
|
+ pr_info("Reload completed, microcode revision: 0x%x -> 0x%x\n",
|
|
+ old, boot_cpu_data.microcode);
|
|
|
|
return ret;
|
|
}
|
|
--
|
|
2.39.3
|
|
|