]> www.infradead.org Git - users/jedix/linux-maple.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)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Sat, 11 Aug 2018 00:44:47 +0000 (20:44 -0400)
commit70730fdf2e6e23a1f43c0425ebd19d7a79117d8d
tree860d2dea2d0ffe97021c5a2571238b63876701ac
parent27ad9589cd55599e2f1c8035b09214ef6dc116f8
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>
Orabug: 28220674
CVE: CVE-2018-3620

(cherry picked from commit 73d5e2b472640b1fcdb61ae8be389912ef211bda)

Signed-off-by: Mihai Carabas <mihai.carabas@oracle.com>
Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
kernel/cpu.c