From: Thomas Gleixner Date: Tue, 5 Jun 2018 23:00:55 +0000 (+0200) Subject: x86/cpu/intel: Evaluate smp_num_siblings early X-Git-Tag: v4.1.12-124.31.3~653 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=e2591e855ca8f9456f7a912d999fe6aba832899b;p=users%2Fjedix%2Flinux-maple.git x86/cpu/intel: Evaluate smp_num_siblings early Make use of the new early detection function to initialize smp_num_siblings on the boot cpu before the MP-Table or ACPI/MADT scan happens. That's required for force disabling SMT. Signed-off-by: Thomas Gleixner Reviewed-by: Konrad Rzeszutek Wilk Acked-by: Ingo Molnar Orabug: 28220674 CVE: CVE-2018-3620 (cherry picked from commit 1910ad5624968f93be48e8e265513c54d66b897c) Signed-off-by: Mihai Carabas Reviewed-by: Darren Kenny Reviewed-by: Boris Ostrovsky Conflicts: arch/x86/kernel/cpu/intel.c Contextual --- diff --git a/arch/x86/kernel/cpu/intel.c b/arch/x86/kernel/cpu/intel.c index 23f86bde85d1..d6937f649087 100644 --- a/arch/x86/kernel/cpu/intel.c +++ b/arch/x86/kernel/cpu/intel.c @@ -159,6 +159,13 @@ static void early_init_intel(struct cpuinfo_x86 *c) pr_info("Disabling PGE capability bit\n"); setup_clear_cpu_cap(X86_FEATURE_PGE); } + + /* + * Get the number of SMT siblings early from the extended topology + * leaf, if available. Otherwise try the legacy SMT detection. + */ + if (detect_extended_topology_early(c) < 0) + detect_ht_early(c); } #ifdef CONFIG_X86_32