Skip to contentSkip to conversation

x86, microcode: Limit the microcode reloading to 64-bit for now

PATCH New Borislav Petkov 2 participants 2 messages Nov 30, 2014 – Dec 1, 2014

Subsystems (2)
lore
Share & tools
lore

Borislav Petkov

author maintainer
#0 lore raw

PATCH 1/1 x86, microcode: Limit the microcode reloading to 64-bit for now

From: Borislav Petkov <[email protected]>

First, there was this: https://bugzilla.kernel.org/show_bug.cgi?id=88001

The problem there was that microcode patches are not being reapplied after suspend-to-ram. It was important to reapply them, though, because of for example Haswell's TSX erratum which disabled TSX instructions with a microcode patch.

A simple fix was

fb86b97300d9 ("x86, microcode: Update BSPs microcode on resume")

but, as it is often the case, simple fixes are too simple. This one causes 32-bit resume to fail:

https://bugzilla.kernel.org/show_bug.cgi?id=88391

Properly fixing this would require more involved changes for which it is too late now, before the merge window. Thus, limit this to 64-bit only temporarily.

---
 arch/x86/kernel/cpu/microcode/core.c | 2 ++
 1 file changed, 2 insertions(+)
arch/x86/kernel/cpu/microcode/core.c +2 -0
index 2ce9051174e6..08fe6e8a726e 100644
@@ -465,6 +465,7 @@ static void mc_bp_resume(void)
 
 	if (uci->valid && uci->mc)
 		microcode_ops->apply_microcode(cpu);
+#ifdef CONFIG_X86_64
 	else if (!uci->mc)
 		/*
 		 * We might resume and not have applied late microcode but still
@@ -473,6 +474,7 @@ static void mc_bp_resume(void)
 		 * applying patches early on the APs.
 		 */
 		load_ucode_ap();
+#endif
 }
 
 static struct syscore_ops mc_syscore_ops = {
Signature · 1 line
2.0.0
#1 lore raw
x86, microcode: Limit the microcode reloading to 64-bit for now
Commit-ID:  02ecc41abcea4ff9291d548f6f846b29b354ddd2
Gitweb:     http://git.kernel.org/tip/02ecc41abcea4ff9291d548f6f846b29b354ddd2
Author:     Borislav Petkov <[email protected]>
AuthorDate: Sun, 30 Nov 2014 14:26:39 +0100
Committer:  Thomas Gleixner <[email protected]>
CommitDate: Mon, 1 Dec 2014 10:55:08 +0100

x86, microcode: Limit the microcode reloading to 64-bit for now

First, there was this: https://bugzilla.kernel.org/show_bug.cgi?id=88001

The problem there was that microcode patches are not being reapplied after suspend-to-ram. It was important to reapply them, though, because of for example Haswell's TSX erratum which disabled TSX instructions with a microcode patch.

A simple fix was fb86b97300d9 ("x86, microcode: Update BSPs microcode on resume") but, as it is often the case, simple fixes are too simple. This one causes 32-bit resume to fail:

https://bugzilla.kernel.org/show_bug.cgi?id=88391

Properly fixing this would require more involved changes for which it is too late now, right before the merge window. Thus, limit this to 64-bit only temporarily.

---
 arch/x86/kernel/cpu/microcode/core.c | 2 ++
 1 file changed, 2 insertions(+)
arch/x86/kernel/cpu/microcode/core.c +2 -0
index 2ce9051..08fe6e8 100644
@@ -465,6 +465,7 @@ static void mc_bp_resume(void)
 
 	if (uci->valid && uci->mc)
 		microcode_ops->apply_microcode(cpu);
+#ifdef CONFIG_X86_64
 	else if (!uci->mc)
 		/*
 		 * We might resume and not have applied late microcode but still
@@ -473,6 +474,7 @@ static void mc_bp_resume(void)
 		 * applying patches early on the APs.
 		 */
 		load_ucode_ap();
+#endif
 }
 
 static struct syscore_ops mc_syscore_ops = {