Commit d92f244b authored by Borislav Petkov's avatar Borislav Petkov Committed by Thadeu Lima de Souza Cascardo

x86/microcode/intel: Disable late loading on model 79

BugLink: http://bugs.launchpad.net/bugs/1731882

commit 723f2828 upstream.

Blacklist Broadwell X model 79 for late loading due to an erratum.
Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
Acked-by: default avatarTony Luck <tony.luck@intel.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20171018111225.25635-1-bp@alien8.deSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarStefan Bader <stefan.bader@canonical.com>
Signed-off-by: default avatarThadeu Lima de Souza Cascardo <cascardo@canonical.com>
parent 6fb1af67
...@@ -990,6 +990,18 @@ static int get_ucode_fw(void *to, const void *from, size_t n) ...@@ -990,6 +990,18 @@ static int get_ucode_fw(void *to, const void *from, size_t n)
return 0; return 0;
} }
static bool is_blacklisted(unsigned int cpu)
{
struct cpuinfo_x86 *c = &cpu_data(cpu);
if (c->x86 == 6 && c->x86_model == 79) {
pr_err_once("late loading on model 79 is disabled.\n");
return true;
}
return false;
}
static enum ucode_state request_microcode_fw(int cpu, struct device *device, static enum ucode_state request_microcode_fw(int cpu, struct device *device,
bool refresh_fw) bool refresh_fw)
{ {
...@@ -998,6 +1010,9 @@ static enum ucode_state request_microcode_fw(int cpu, struct device *device, ...@@ -998,6 +1010,9 @@ static enum ucode_state request_microcode_fw(int cpu, struct device *device,
const struct firmware *firmware; const struct firmware *firmware;
enum ucode_state ret; enum ucode_state ret;
if (is_blacklisted(cpu))
return UCODE_NFOUND;
sprintf(name, "intel-ucode/%02x-%02x-%02x", sprintf(name, "intel-ucode/%02x-%02x-%02x",
c->x86, c->x86_model, c->x86_mask); c->x86, c->x86_model, c->x86_mask);
...@@ -1022,6 +1037,9 @@ static int get_ucode_user(void *to, const void *from, size_t n) ...@@ -1022,6 +1037,9 @@ static int get_ucode_user(void *to, const void *from, size_t n)
static enum ucode_state static enum ucode_state
request_microcode_user(int cpu, const void __user *buf, size_t size) request_microcode_user(int cpu, const void __user *buf, size_t size)
{ {
if (is_blacklisted(cpu))
return UCODE_NFOUND;
return generic_load_microcode(cpu, (void *)buf, size, &get_ucode_user); return generic_load_microcode(cpu, (void *)buf, size, &get_ucode_user);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment