Re: [PATCH v2] x86/speculation: Add support for STIBP always-on preferred mode

2018-12-12 Thread Lendacky, Thomas
On 12/12/2018 08:23 AM, Thomas Gleixner wrote: > On Wed, 12 Dec 2018, Lendacky, Thomas wrote: >> On 12/11/2018 09:37 PM, Thomas Gleixner wrote: >>> On Wed, 12 Dec 2018, Borislav Petkov wrote: I still don't like that separate stibp_always_on variable when we can do all the querying just by

Re: [PATCH v2] x86/speculation: Add support for STIBP always-on preferred mode

2018-12-12 Thread Lendacky, Thomas
On 12/12/2018 08:32 AM, Boris Petkov wrote: > On December 12, 2018 3:04:35 PM GMT+01:00, "Lendacky, Thomas" > wrote: >> Not sure I completely follow. Are you saying to do what I did in my >> first patch or something different from that yet? > > I'm saying that STIBP_ALWAYS_ON should be implement

Re: [PATCH v2] x86/speculation: Add support for STIBP always-on preferred mode

2018-12-12 Thread Boris Petkov
On December 12, 2018 3:04:35 PM GMT+01:00, "Lendacky, Thomas" wrote: >Not sure I completely follow. Are you saying to do what I did in my >first patch or something different from that yet? I'm saying that STIBP_ALWAYS_ON should be implemented the same way like IBRS_ENHANCED is and there's no ne

Re: [PATCH v2] x86/speculation: Add support for STIBP always-on preferred mode

2018-12-12 Thread Thomas Gleixner
On Wed, 12 Dec 2018, Lendacky, Thomas wrote: > On 12/11/2018 09:37 PM, Thomas Gleixner wrote: > > On Wed, 12 Dec 2018, Borislav Petkov wrote: > >> I still don't like that separate stibp_always_on variable when we can do > >> all the querying just by using mode and X86_FEATURE_AMD_STIBP_ALWAYS_ON. >

Re: [PATCH v2] x86/speculation: Add support for STIBP always-on preferred mode

2018-12-12 Thread Lendacky, Thomas
On 12/12/2018 03:59 AM, Borislav Petkov wrote: > On Tue, Dec 11, 2018 at 07:37:26PM -0800, Thomas Gleixner wrote: >> Hmmm. I've not seen the V1 of this (it's not in my inbox) but the v1->v2 >> changes contain: > > You're on CC: > > https://lkml.kernel.org/r/20181211190959.28321.56433.st...@tlenda

Re: [PATCH v2] x86/speculation: Add support for STIBP always-on preferred mode

2018-12-12 Thread Lendacky, Thomas
On 12/11/2018 09:37 PM, Thomas Gleixner wrote: > On Wed, 12 Dec 2018, Borislav Petkov wrote: >> On Tue, Dec 11, 2018 at 10:46:16PM +, Lendacky, Thomas wrote: >>> + /* >>> +* At this point, an STIBP mode other than "off" has been set. >>> +* If STIBP support is not being forced, check

Re: [PATCH v2] x86/speculation: Add support for STIBP always-on preferred mode

2018-12-12 Thread Borislav Petkov
On Tue, Dec 11, 2018 at 07:37:26PM -0800, Thomas Gleixner wrote: > Hmmm. I've not seen the V1 of this (it's not in my inbox) but the v1->v2 > changes contain: You're on CC: https://lkml.kernel.org/r/20181211190959.28321.56433.st...@tlendack-t1.amdoffice.net > > > > - Removed explicit SPECTRE_V2

Re: [PATCH v2] x86/speculation: Add support for STIBP always-on preferred mode

2018-12-11 Thread Thomas Gleixner
On Wed, 12 Dec 2018, Borislav Petkov wrote: > On Tue, Dec 11, 2018 at 10:46:16PM +, Lendacky, Thomas wrote: > > + /* > > +* At this point, an STIBP mode other than "off" has been set. > > +* If STIBP support is not being forced, check if STIBP always-on > > +* is preferred. > > +

Re: [PATCH v2] x86/speculation: Add support for STIBP always-on preferred mode

2018-12-11 Thread Borislav Petkov
On Tue, Dec 11, 2018 at 10:46:16PM +, Lendacky, Thomas wrote: > Different AMD processors may have different implementations of STIBP. > When STIBP is conditionally enabled, some implementations would benefit > from having STIBP always on instead of toggling the STIBP bit through MSR > writes. T

[PATCH v2] x86/speculation: Add support for STIBP always-on preferred mode

2018-12-11 Thread Lendacky, Thomas
Different AMD processors may have different implementations of STIBP. When STIBP is conditionally enabled, some implementations would benefit from having STIBP always on instead of toggling the STIBP bit through MSR writes. This preference is advertised through a CPUID feature bit. When conditiona