Skip to content

Commit da0933c

Browse files
suryasaimadhugregkh
authored andcommitted
x86/microcode/intel: Disable late loading on model 79
commit 723f2828a98c8ca19842042f418fb30dd8cfc0f7 upstream. Blacklist Broadwell X model 79 for late loading due to an erratum. Signed-off-by: Borislav Petkov <bp@suse.de> Acked-by: Tony 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.de Signed-off-by: Ingo Molnar <mingo@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent a272dc7 commit da0933c

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

  • arch/x86/kernel/cpu/microcode

arch/x86/kernel/cpu/microcode/intel.c

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -990,6 +990,18 @@ static int get_ucode_fw(void *to, const void *from, size_t n)
990990
return 0;
991991
}
992992

993+
static bool is_blacklisted(unsigned int cpu)
994+
{
995+
struct cpuinfo_x86 *c = &cpu_data(cpu);
996+
997+
if (c->x86 == 6 && c->x86_model == 79) {
998+
pr_err_once("late loading on model 79 is disabled.\n");
999+
return true;
1000+
}
1001+
1002+
return false;
1003+
}
1004+
9931005
static enum ucode_state request_microcode_fw(int cpu, struct device *device,
9941006
bool refresh_fw)
9951007
{
@@ -998,6 +1010,9 @@ static enum ucode_state request_microcode_fw(int cpu, struct device *device,
9981010
const struct firmware *firmware;
9991011
enum ucode_state ret;
10001012

1013+
if (is_blacklisted(cpu))
1014+
return UCODE_NFOUND;
1015+
10011016
sprintf(name, "intel-ucode/%02x-%02x-%02x",
10021017
c->x86, c->x86_model, c->x86_mask);
10031018

@@ -1022,6 +1037,9 @@ static int get_ucode_user(void *to, const void *from, size_t n)
10221037
static enum ucode_state
10231038
request_microcode_user(int cpu, const void __user *buf, size_t size)
10241039
{
1040+
if (is_blacklisted(cpu))
1041+
return UCODE_NFOUND;
1042+
10251043
return generic_load_microcode(cpu, (void *)buf, size, &get_ucode_user);
10261044
}
10271045

0 commit comments

Comments
 (0)