On new microcode write, check whether IBRS and IBPB features
are present by rescanning scattered CPU features.
Orabug:
27344012
CVE: CVE-2017-5715
Signed-off-by: Tim Chen <tim.c.chen@linux.intel.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Reviewed-by: John Haxby <john.haxby@oracle.com>
Signed-off-by: Kirtikar Kashyap <kirtikar.kashyap@oracle.com>
if (ret > 0)
perf_check_microcode();
+ /* check spec_ctrl capabilities */
+ mutex_lock(&spec_ctrl_mutex);
+ init_scattered_cpuid_features(&boot_cpu_data);
+ mutex_unlock(&spec_ctrl_mutex);
+
mutex_unlock(µcode_mutex);
put_online_cpus();