]> www.infradead.org Git - users/jedix/linux-maple.git/commit
x86/IBRS/IBPB: Set sysctl_ibrs/ibpb_enabled properly
authorBoris Ostrovsky <boris.ostrovsky@oracle.com>
Wed, 10 Jan 2018 00:08:44 +0000 (19:08 -0500)
committerKirtikar Kashyap <kirtikar.kashyap@oracle.com>
Fri, 12 Jan 2018 18:33:04 +0000 (10:33 -0800)
commit98d544ad4bde77edd4a1d7502a8cd67062986284
treeec5707076eaa1057321e3dd3580bc3163f9f0c38
parentfeadf496426566a1a0850d0ad3de06112fbf6b73
x86/IBRS/IBPB: Set sysctl_ibrs/ibpb_enabled properly

init_scattered_cpuid_features() is called twice, first time from
early_cpu_init(), before 'noibrs' or 'noibpb' option are parsed.
This results in setting of sysctl_* variables. When we call
init_scattered_cpuid_features() the second time, after the boot options
have been parsed, init_scattered_cpuid_features() will leave sysctl_*
parameters unchanged (i.e. already set).

To avoid this, always set those variables based on ibrs/pb_inuse.

Orabug: 27382723

Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Brian Maly <brian.maly@oracle.com>
Signed-off-by: Kirtikar Kashyap <kirtikar.kashyap@oracle.com>
arch/x86/kernel/cpu/scattered.c