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

x86/microcode: Adjust late loading result reporting message

stable inclusion
from stable-v5.10.173
commit 8e83e1619fac9151b1515177f5066ae67b0cbda2
category: feature
bugzilla: https://gitee.com/openeuler/intel-kernel/issues/I873BU
CVE: N/A
Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=8e83e1619fac9151b1515177f5066ae67b0cbda2



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

Intel-SIG: commit 8e83e1619fac x86/microcode: Adjust late loading result reporting message.
Backport x86/microcode related patches from 5.10.173 upstream.

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

[ Upstream commit 6eab3aba ]

During late microcode loading, the "Reload completed" message is issued
unconditionally, regardless of success or failure.

Adjust the message to report the result of the update.

  [ bp: Massage. ]

Fixes: 9bd68125 ("x86/microcode: Announce reload operation's completion")
Suggested-by: default avatarThomas Gleixner <tglx@linutronix.de>
Signed-off-by: default avatarAshok Raj <ashok.raj@intel.com>
Signed-off-by: default avatarBorislav Petkov (AMD) <bp@alien8.de>
Reviewed-by: default avatarTony Luck <tony.luck@intel.com>
Link: https://lore.kernel.org/lkml/874judpqqd.ffs@tglx/


Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
[ Aichun Shi: amend commit log ]
Signed-off-by: default avatarAichun Shi <aichun.shi@intel.com>
parent 3bb001b6
Loading
Loading
Loading
Loading
+7 −4
Original line number Diff line number Diff line
@@ -631,11 +631,14 @@ static int microcode_reload_late(void)
	store_cpu_caps(&prev_info);

	ret = stop_machine_cpuslocked(__reload_late, NULL, cpu_online_mask);
	if (ret == 0)
		microcode_check(&prev_info);

	pr_info("Reload completed, microcode revision: 0x%x -> 0x%x\n",
	if (!ret) {
		pr_info("Reload succeeded, microcode revision: 0x%x -> 0x%x\n",
			old, boot_cpu_data.microcode);
		microcode_check(&prev_info);
	} else {
		pr_info("Reload failed, current microcode revision: 0x%x\n",
			boot_cpu_data.microcode);
	}

	return ret;
}