diff options
author | Andi Kleen <ak@linux.intel.com> | 2018-08-24 13:03:51 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2018-08-27 04:29:14 -0400 |
commit | 1ab534e85c93945f7862378d8c8adcf408205b19 (patch) | |
tree | 261ba0e0a984f93391c465b25d6170e2f7ea413a /arch/x86/kernel/cpu/intel.c | |
parent | 5b394b2ddf0347bef56e50c69a58773c94343ff3 (diff) |
x86/spectre: Add missing family 6 check to microcode check
The check for Spectre microcodes does not check for family 6, only the
model numbers.
Add a family 6 check to avoid ambiguity with other families.
Fixes: a5b296636453 ("x86/cpufeature: Blacklist SPEC_CTRL/PRED_CMD on early Spectre v2 microcodes")
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: x86@kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: stable@vger.kernel.org
Link: https://lkml.kernel.org/r/20180824170351.34874-2-andi@firstfloor.org
Diffstat (limited to 'arch/x86/kernel/cpu/intel.c')
-rw-r--r-- | arch/x86/kernel/cpu/intel.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/x86/kernel/cpu/intel.c b/arch/x86/kernel/cpu/intel.c index 401e8c133108..fc3c07fe7df5 100644 --- a/arch/x86/kernel/cpu/intel.c +++ b/arch/x86/kernel/cpu/intel.c | |||
@@ -150,6 +150,9 @@ static bool bad_spectre_microcode(struct cpuinfo_x86 *c) | |||
150 | if (cpu_has(c, X86_FEATURE_HYPERVISOR)) | 150 | if (cpu_has(c, X86_FEATURE_HYPERVISOR)) |
151 | return false; | 151 | return false; |
152 | 152 | ||
153 | if (c->x86 != 6) | ||
154 | return false; | ||
155 | |||
153 | for (i = 0; i < ARRAY_SIZE(spectre_bad_microcodes); i++) { | 156 | for (i = 0; i < ARRAY_SIZE(spectre_bad_microcodes); i++) { |
154 | if (c->x86_model == spectre_bad_microcodes[i].model && | 157 | if (c->x86_model == spectre_bad_microcodes[i].model && |
155 | c->x86_stepping == spectre_bad_microcodes[i].stepping) | 158 | c->x86_stepping == spectre_bad_microcodes[i].stepping) |