]> www.infradead.org Git - users/jedix/linux-maple.git/commit
x86/bugs/IBRS: Use variable instead of defines for enabling IBRS
authorKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Sun, 13 May 2018 23:06:42 +0000 (23:06 +0000)
committerBrian Maly <brian.maly@oracle.com>
Mon, 21 May 2018 22:02:26 +0000 (18:02 -0400)
commit11abfc2b4d65eb0ef40ee32dbbd7620a5324e535
treee70ba7cb2507d615b0ea00188d99b21cb6d501e3
parent964bf9dfcbf923f03ce943155c1a6c5eb12a2c1b
x86/bugs/IBRS: Use variable instead of defines for enabling IBRS

This follows what "x86/bugs: Read SPEC_CTRL MSR during boot and re-use
reserved bits" patch does - that is respect the other bits of the
SPEC CTRL MSR (if any at all).

This necessitates to convert all the assembler macros over, all
the various uses of the SPEC CTRL guarded by 'use_ibrs'.

Note the not so obvious change in the assembler macro from 'cmp' to
'test' to verify the right bit being set.

And to make sure it works with the IBRS support we need to
recognize it in x86_spec_ctrl_set.

This is not upstreamed. It builds on top of IBRS backport.

OraBug: 28041771
CVE: CVE-2018-3639

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Reviewed-by: Mihai Carabas <mihai.carabas@oracle.com>
Signed-off-by: Brian Maly <brian.maly@oracle.com>
Conflicts:
arch/x86/kernel/cpu/bugs_64.c

Signed-off-by: Brian Maly <brian.maly@oracle.com>
arch/x86/include/asm/mwait.h
arch/x86/include/asm/spec_ctrl.h
arch/x86/kernel/cpu/bugs_64.c
arch/x86/kernel/cpu/spec_ctrl.c
arch/x86/kernel/process.c
arch/x86/kernel/smpboot.c
arch/x86/kvm/svm.c
arch/x86/kvm/vmx.c