]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
x86/cpu/intel: Evaluate smp_num_siblings early
authorThomas Gleixner <tglx@linutronix.de>
Tue, 5 Jun 2018 23:00:55 +0000 (01:00 +0200)
committerStefan Bader <stefan.bader@canonical.com>
Wed, 8 Aug 2018 12:08:07 +0000 (14:08 +0200)
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 <tglx@linutronix.de>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Acked-by: Ingo Molnar <mingo@kernel.org>
CVE-2018-3620
CVE-2018-3646

Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
arch/x86/kernel/cpu/intel.c

index 6df33c2d6f014aeb5d0c9eef9717389c9de32641..9b9da099f2ef0434a00dfdaf8a6be217c18a1d62 100644 (file)
@@ -301,6 +301,13 @@ static void early_init_intel(struct cpuinfo_x86 *c)
        }
 
        check_mpx_erratum(c);
+
+       /*
+        * 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