Re: [PATCH] x86/speculation: Simplify the CPU bug detection logic

2018-05-23 Thread Thomas Gleixner
On Wed, 23 May 2018, Konrad Rzeszutek Wilk wrote: > > @@ -973,16 +965,16 @@ static void __init cpu_set_bug_bits(struct > > cpuinfo_x86 *c) > > if (cpu_has(c, X86_FEATURE_ARCH_CAPABILITIES)) > > rdmsrl(MSR_IA32_ARCH_CAPABILITIES, ia32_cap); > > Would it make sense to move that abov

Re: [PATCH] x86/speculation: Simplify the CPU bug detection logic

2018-05-23 Thread Konrad Rzeszutek Wilk
On Tue, May 22, 2018 at 11:05:39AM +0200, Dominik Brodowski wrote: > Only CPUs which speculate can speculate. Therefore, it seems prudent > to test for cpu_no_speculation first and only then determine whether > a specific speculating CPU is susceptible to store bypass speculation. > This is underli

[PATCH] x86/speculation: Simplify the CPU bug detection logic

2018-05-22 Thread Dominik Brodowski
Only CPUs which speculate can speculate. Therefore, it seems prudent to test for cpu_no_speculation first and only then determine whether a specific speculating CPU is susceptible to store bypass speculation. This is underlined by all CPUs currently listed in cpu_no_speculation were present in cpu_