Skip to content

Commit 7fce8d6

Browse files
ashok-rajsuryasaimadhu
authored andcommitted
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
1 parent 8c61eaf commit 7fce8d6

File tree

1 file changed

+3
-2
lines changed
  • arch/x86/kernel/cpu/microcode

1 file changed

+3
-2
lines changed

arch/x86/kernel/cpu/microcode/core.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@ static int __reload_late(void *info)
491491
*/
492492
static int microcode_reload_late(void)
493493
{
494-
int ret;
494+
int old = boot_cpu_data.microcode, ret;
495495

496496
pr_err("Attempting late microcode loading - it is dangerous and taints the kernel.\n");
497497
pr_err("You should switch to early loading, if possible.\n");
@@ -503,7 +503,8 @@ static int microcode_reload_late(void)
503503
if (ret == 0)
504504
microcode_check();
505505

506-
pr_info("Reload completed, microcode revision: 0x%x\n", boot_cpu_data.microcode);
506+
pr_info("Reload completed, microcode revision: 0x%x -> 0x%x\n",
507+
old, boot_cpu_data.microcode);
507508

508509
return ret;
509510
}

0 commit comments

Comments
 (0)