]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
cpu/hotplug: detect SMT disabled by BIOS
authorJosh Poimboeuf <jpoimboe@redhat.com>
Tue, 24 Jul 2018 16:17:40 +0000 (18:17 +0200)
committerStefan Bader <stefan.bader@canonical.com>
Wed, 8 Aug 2018 12:08:07 +0000 (14:08 +0200)
commit3254908523ead72b38885e52bd4f8e6e421c1fb3
treea51971aa7a9da5f4c63168442ab6ffe6cf8d0704
parent4869ec69e3b1c2d493313eb9a0ae77b795bd79e7
cpu/hotplug: detect SMT disabled by BIOS

If SMT is disabled in BIOS, the CPU code doesn't properly detect it.
The /sys/devices/system/cpu/smt/control file shows 'on', and the 'l1tf'
vulnerabilities file shows SMT as vulnerable.

Fix it by forcing 'cpu_smt_control' to CPU_SMT_NOT_SUPPORTED in such a
case.  Unfortunately the detection can only be done after bringing all
the CPUs online, so we have to overwrite any previous writes to the
variable.

Reported-by: Joe Mario <jmario@redhat.com>
Tested-by: Jiri Kosina <jkosina@suse.cz>
Fixes: f048c399e0f7 ("x86/topology: Provide topology_smt_supported()")
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
CVE-2018-3620
CVE-2018-3646

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