Re: [patch 21/24] x86/speculation: Prepare arch_smt_update() for PRCTL mode

2018-11-22 Thread Jiri Kosina
On Fri, 23 Nov 2018, Thomas Gleixner wrote: > > So I'm wondering, shouldn't > > firmware_restrict_branch_speculation_start()/_end() > > also enable/disable STIBP? It already enabled/disables IBRS. > > IBRS includes STIBP. True. > We don't use IBRS in the kernel otherwise because you'd have

Re: [patch 21/24] x86/speculation: Prepare arch_smt_update() for PRCTL mode

2018-11-22 Thread Jiri Kosina
On Fri, 23 Nov 2018, Thomas Gleixner wrote: > > So I'm wondering, shouldn't > > firmware_restrict_branch_speculation_start()/_end() > > also enable/disable STIBP? It already enabled/disables IBRS. > > IBRS includes STIBP. True. > We don't use IBRS in the kernel otherwise because you'd have

Re: [patch 21/24] x86/speculation: Prepare arch_smt_update() for PRCTL mode

2018-11-22 Thread Thomas Gleixner
On Thu, 22 Nov 2018, Ingo Molnar wrote: > * Thomas Gleixner wrote: > > +static void update_stibp_msr(void *info) > > { > > - /* Enhanced IBRS makes using STIBP unnecessary. */ > > - if (spectre_v2_enabled == SPECTRE_V2_IBRS_ENHANCED) > > - return false; > > - > > - /* Check for

Re: [patch 21/24] x86/speculation: Prepare arch_smt_update() for PRCTL mode

2018-11-22 Thread Thomas Gleixner
On Thu, 22 Nov 2018, Ingo Molnar wrote: > * Thomas Gleixner wrote: > > +static void update_stibp_msr(void *info) > > { > > - /* Enhanced IBRS makes using STIBP unnecessary. */ > > - if (spectre_v2_enabled == SPECTRE_V2_IBRS_ENHANCED) > > - return false; > > - > > - /* Check for

Re: [patch 21/24] x86/speculation: Prepare arch_smt_update() for PRCTL mode

2018-11-21 Thread Ingo Molnar
* Thomas Gleixner wrote: > The upcoming fine grained per task STIBP control needs to be updated on CPU > hotplug as well. > > Split out the code which controls the strict mode so the prctl control code > can be added later. > > Signed-off-by: Thomas Gleixner > --- >

Re: [patch 21/24] x86/speculation: Prepare arch_smt_update() for PRCTL mode

2018-11-21 Thread Ingo Molnar
* Thomas Gleixner wrote: > The upcoming fine grained per task STIBP control needs to be updated on CPU > hotplug as well. > > Split out the code which controls the strict mode so the prctl control code > can be added later. > > Signed-off-by: Thomas Gleixner > --- >

[patch 21/24] x86/speculation: Prepare arch_smt_update() for PRCTL mode

2018-11-21 Thread Thomas Gleixner
The upcoming fine grained per task STIBP control needs to be updated on CPU hotplug as well. Split out the code which controls the strict mode so the prctl control code can be added later. Signed-off-by: Thomas Gleixner --- arch/x86/kernel/cpu/bugs.c | 46

[patch 21/24] x86/speculation: Prepare arch_smt_update() for PRCTL mode

2018-11-21 Thread Thomas Gleixner
The upcoming fine grained per task STIBP control needs to be updated on CPU hotplug as well. Split out the code which controls the strict mode so the prctl control code can be added later. Signed-off-by: Thomas Gleixner --- arch/x86/kernel/cpu/bugs.c | 46