[arch-commits] Commit in linux/trunk (PKGBUILD fix_CPU0_microcode_on_resume.patch)
Thomas Bächler
thomas at archlinux.org
Sat Dec 6 14:18:19 UTC 2014
Date: Saturday, December 6, 2014 @ 15:18:18
Author: thomas
Revision: 227321
upgpkg: linux 3.17.4-2: Use correct microcode resume fix
Modified:
linux/trunk/PKGBUILD
linux/trunk/fix_CPU0_microcode_on_resume.patch
------------------------------------+
PKGBUILD | 11 +-------
fix_CPU0_microcode_on_resume.patch | 47 ++++++++++++++++++++++++++---------
2 files changed, 38 insertions(+), 20 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2014-12-06 11:59:15 UTC (rev 227320)
+++ PKGBUILD 2014-12-06 14:18:18 UTC (rev 227321)
@@ -6,7 +6,7 @@
#pkgbase=linux-custom # Build kernel with a different name
_srcname=linux-3.17
pkgver=3.17.4
-pkgrel=1
+pkgrel=2
arch=('i686' 'x86_64')
url="http://www.kernel.org/"
license=('GPL2')
@@ -27,7 +27,7 @@
'66fc95823d3c99167532f37c07e9582d305961103997fcc61cfc7f6a86b34130'
'f0d90e756f14533ee67afda280500511a62465b4f76adcc5effa95a40045179c'
'1256b241cd477b265a3c2d64bdc19ffe3c9bbcee82ea3994c590c2c76e767d99'
- '43668fe46147fe93f41b919db673574427ce5a8c376cd28ddddcbf3a00326491')
+ '4eb64c2520e9bcdff47d757946011b4bf9896186d285361f18364c7ff9b2c699')
_kernelname=${pkgbase#linux}
@@ -297,10 +297,3 @@
done
# vim:set ts=8 sts=2 sw=2 et:
-sha256sums=('f5153ec93c5fcd41b247950e6a9bcbc63fa87beafd112c133a622439a0f76251'
- 'eeef37397a15245bd143569908be40622a87dc7673965e623e811ea3f68b8434'
- 'ea9de72fe335055f6e8eebd1d85cad150a47a81004bb27d78f18f2591fd3bbd5'
- '66fc95823d3c99167532f37c07e9582d305961103997fcc61cfc7f6a86b34130'
- 'f0d90e756f14533ee67afda280500511a62465b4f76adcc5effa95a40045179c'
- '1256b241cd477b265a3c2d64bdc19ffe3c9bbcee82ea3994c590c2c76e767d99'
- '43668fe46147fe93f41b919db673574427ce5a8c376cd28ddddcbf3a00326491')
Modified: fix_CPU0_microcode_on_resume.patch
===================================================================
--- fix_CPU0_microcode_on_resume.patch 2014-12-06 11:59:15 UTC (rev 227320)
+++ fix_CPU0_microcode_on_resume.patch 2014-12-06 14:18:18 UTC (rev 227321)
@@ -1,21 +1,46 @@
+From fb86b97300d930b57471068720c52bfa8622eab7 Mon Sep 17 00:00:00 2001
+From: Borislav Petkov <bp at suse.de>
+Date: Tue, 18 Nov 2014 10:46:57 +0100
+Subject: [PATCH] x86, microcode: Update BSPs microcode on resume
+
+In the situation when we apply early microcode but do *not* apply late
+microcode, we fail to update the BSP's microcode on resume because we
+haven't initialized the uci->mc microcode pointer. So, in order to
+alleviate that, we go and dig out the stashed microcode patch during
+early boot. It is basically the same thing that is done on the APs early
+during boot so do that too here.
+
+Tested-by: alex.schnaidt at gmail.com
+Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=88001
+Cc: Henrique de Moraes Holschuh <hmh at hmh.eng.br>
+Cc: Fenghua Yu <fenghua.yu at intel.com>
+Cc: <stable at vger.kernel.org> # v3.9
+Signed-off-by: Borislav Petkov <bp at suse.de>
+Link: http://lkml.kernel.org/r/20141118094657.GA6635@pd.tnic
+Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
+---
+ arch/x86/kernel/cpu/microcode/core.c | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
diff --git a/arch/x86/kernel/cpu/microcode/core.c b/arch/x86/kernel/cpu/microcode/core.c
-index dd9d6190b08d..181e42bd85d3 100644
+index dd9d619..2ce9051 100644
--- a/arch/x86/kernel/cpu/microcode/core.c
+++ b/arch/x86/kernel/cpu/microcode/core.c
-@@ -85,6 +85,7 @@
- #include <linux/syscore_ops.h>
+@@ -465,6 +465,14 @@ static void mc_bp_resume(void)
- #include <asm/microcode.h>
-+#include <asm/microcode_intel.h>
- #include <asm/processor.h>
- #include <asm/cpu_device_id.h>
- #include <asm/perf_event.h>
-@@ -465,6 +466,8 @@ static void mc_bp_resume(void)
-
if (uci->valid && uci->mc)
microcode_ops->apply_microcode(cpu);
+ else if (!uci->mc)
-+ load_ucode_intel_ap();
++ /*
++ * We might resume and not have applied late microcode but still
++ * have a newer patch stashed from the early loader. We don't
++ * have it in uci->mc so we have to load it the same way we're
++ * applying patches early on the APs.
++ */
++ load_ucode_ap();
}
static struct syscore_ops mc_syscore_ops = {
+--
+2.1.3
+
More information about the arch-commits
mailing list