Re: [PATCH v9 3/8] x86/split_lock: Introduce flag X86_FEATURE_SLD_FATAL and drop sld_state
From: Andy Lutomirski
Date: Sun May 10 2020 - 01:14:38 EST
On Fri, May 8, 2020 at 8:03 PM Xiaoyao Li <xiaoyao.li@xxxxxxxxx> wrote:
>
> Introduce a synthetic feature flag X86_FEATURE_SLD_FATAL, which means
> kernel is in sld_fatal mode if set.
>
> Now sld_state is not needed any more that the state of SLD can be
> inferred from X86_FEATURE_SPLIT_LOCK_DETECT and X86_FEATURE_SLD_FATAL.
Is it too much to ask for Intel to actually allocate and define a
CPUID bit that means "this CPU *always* sends #AC on a split lock"?
This would be a pure documentation change, but it would make this
architectural rather than something that each hypervisor needs to hack
up.
Meanwhile, I don't see why adding a cpufeature flag is worthwhile to
avoid a less bizarre global variable. There's no performance issue
here, and the old code looked a lot more comprehensible than the new
code.