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

From: Lendacky, Thomas
Date: Wed Dec 12 2018 - 10:04:15 EST

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 using mode and X86_FEATURE_AMD_STIBP_ALWAYS_ON.
>>> Hmmm. I've not seen the V1 of this (it's not in my inbox) but the v1->v2
>>> changes contain:
>> That's strange, you were on the cc: list. Anyway, here's a link to the
>> first version:
> Must have been my sleep deprived brain. Found it now :) Sorry for not
> paying attention back then.
>>>>> - Removed explicit SPECTRE_V2_USER_STRICT_PREFERRED mode
>>> Now I really have to ask why?
>>> Neither the extra variable nor the cpu feature check are pretty. An
>>> explicit mode is way better in terms of code clarity and you get the proper
>>> printout via spectre_v2_user_strings.
>>> Hmm?
>> That is what the first version did. See if that's in-line with what
>> you're thinking.
> Yes, though I'm not too fond about the preferred wording, but can't come up
> with anything better.

I'm not crazy about that either. Maybe getting rid of "preferred" and just
having "always-on" for the wording is enough?


> Thanks,
> tglx