Re: [patch RFC 4/5] x86/cpufeatures: Detect Speculation control feature
From: Thomas Gleixner
Date: Wed Jan 10 2018 - 06:06:14 EST
On Wed, 10 Jan 2018, Ingo Molnar wrote:
> > If CPUID(7).RDX[26] is set then MSR_IA32_SPEC_CTRL (0x48) is available and
> > bit 0 of that MSR controls whether Indirect Branch Speculation is
> > restricted or not. The control bit is named IBRS (Indirect Branch
> > Restricted Speculation). The IBSR bit can be unconditionally set to 1
> > without clearing it before.
>
> Argh for inverted logic: why was the control bit defined for a _negated_ value,
> i.e. why does '0' mean "don't don't speculate"?
>
> And yes, I know what's behind it: this way 'IBRS' can be called a 'mitigation
> feature' that can be 'enabled', instead of calling it a 'broken CPU feature
> feature' that has to be disabled ...
>
> That's nonsense that causes confusion to no end:
Yes, it's horrible and on my todo list to clean that up at least on any
layer which is above the pure MSR definition level, which we can't change.
The steam blasting of that mess is not even halfways done.
Thanks,
tglx