]> www.infradead.org Git - users/jedix/linux-maple.git/commit
x86/IBRS: Don't try to change IBRS mode if IBRS is not available
authorBoris Ostrovsky <boris.ostrovsky@oracle.com>
Tue, 23 Jan 2018 16:02:42 +0000 (11:02 -0500)
committerJack Vogel <jack.vogel@oracle.com>
Sat, 27 Jan 2018 00:32:56 +0000 (16:32 -0800)
commit550dd697bc302d3598542a284be4986c75f1d95f
treec5577d2b0aa24df35b4542d2e7225dceff0b1d4a
parent6356581e07921f134124f909e17cdfc52acac139
x86/IBRS: Don't try to change IBRS mode if IBRS is not available

sysctl_ibrs_enabled is set properly when IBRS support is discovered
in init_scattered_cpuid_features(). We should simply return an error
when attempt is made to change IBRS mode when the feature is not supoorted.

There is also no need to call set_ibrs_inuse() when changing mode to 1:
this is already done by clear_ibrs_disabled().

Orabug: 27448280

Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Reviewed-by: Krish Sadhukhan <krish.sadhukhan@oracle.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
arch/x86/kernel/cpu/spec_ctrl.c