Commit c851af28 authored by Ashok Raj's avatar Ashok Raj Committed by Aichun Shi
Browse files

x86/microcode: Print previous version of microcode after reload

mainline inclusion
from mainline-v6.1-rc1
commit 7fce8d6e
category: feature
feature: Backport Intel In Field Scan(IFS) multi-blob images support
bugzilla: https://gitee.com/openeuler/intel-kernel/issues/I6L337
CVE: N/A
Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/


commit/?id=7fce8d6e

Intel-SIG: commit 7fce8d6e ("x86/microcode: Print previous version of microcode after reload")

-------------------------------------

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: default avatarAshok Raj <ashok.raj@intel.com>
Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
Acked-by: default avatarTony Luck <tony.luck@intel.com>
Link: https://lore.kernel.org/r/20220829181030.722891-1-ashok.raj@intel.com


Signed-off-by: default avatarAichun Shi <aichun.shi@intel.com>
parent d75018fd
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -508,7 +508,7 @@ static int __reload_late(void *info)
 */
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");
@@ -520,7 +520,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;
}