]> www.infradead.org Git - users/jedix/linux-maple.git/commit
x86/speculation: Enable enhanced IBRS usage
authorAlejandro Jimenez <alejandro.j.jimenez@oracle.com>
Tue, 6 Nov 2018 05:00:39 +0000 (00:00 -0500)
committerBrian Maly <brian.maly@oracle.com>
Wed, 2 Jan 2019 18:08:56 +0000 (13:08 -0500)
commit547420519556bbe71c8e16af0c668c0aadf818eb
tree57f7e7327fb9e80af8690de90b0a4a060716d03d
parent9fa5b5f6e8f239d0b668029358b0453c9b5955af
x86/speculation: Enable enhanced IBRS usage

Enhanced IBRS supports an 'always on' model (aka IBRS_ALL) in
which IBRS is enabled once and never disabled, while basic IBRS
requires IBRS to be set after every transition to a more
privileged predictor mode.

IBRS is enabled at boot if selected as the spectre v2
mitigation, or by using the debugfs interface at
/sys/kernel/debug/x86/ibrs_enabled
to dynamically toggle between IBRS and retpoline during
regular system operation. In both cases, if enhanced IBRS is
available it will be preferred over basic IBRS.

Signed-off-by: Alejandro Jimenez <alejandro.j.jimenez@oracle.com>
Co-developed-by: Alexandre Chartre <alexandre.chartre@oracle.com>
Reviewed-by: Alexandre Chartre <alexandre.chartre@oracle.com>
(cherry picked from commit d19b574a5e5dabca5158b3331aa1a31070da753c from UEK5)

Orabug: 28474851

Signed-off-by: Alejandro Jimenez <alejandro.j.jimenez@oracle.com>
Reviewed-by: Alexandre Chartre <alexandre.chartre@oracle.com>
Signed-off-by: Brian Maly <brian.maly@oracle.com>
Conflicts:
arch/x86/include/asm/cpufeatures.h
(File named cpufeature.h in UEK4)

arch/x86/kernel/cpu/bugs.c
(File named bugs_64.c in UEK4)

arch/x86/kernel/cpu/common.c
arch/x86/kernel/cpu/spec_ctrl.c
(Corresponding code located in bug_64.c in UEK4)

Signed-off-by: Brian Maly <brian.maly@oracle.com>
arch/x86/include/asm/cpufeature.h
arch/x86/kernel/cpu/bugs_64.c
arch/x86/kernel/cpu/scattered.c