Re: [PATCH v2] x86/split_lock: Handle unexpected split lock as fatal

From: Dave Hansen

Date: Wed Jan 07 2026 - 10:19:20 EST


On 1/7/26 05:49, Xiaoyao Li wrote:
> + /*
> + * If #AC occurs on split lock without X86_FEATURE_SPLIT_LOCK_DETECT
> + * the kernel cannot handle it by disabling the detection. Treat it as
> + * fatal regardless of the sld_state.
> + */
> + if (!cpu_feature_enabled(X86_FEATURE_SPLIT_LOCK_DETECT))
> + return true;

If #AC occurs on split lock without X86_FEATURE_SPLIT_LOCK_DETECT, that
sounds more like a naughty hypervisor or buggy CPU that deserves a
BUG_ON() rather than a situation where the kernel wants to move merrily
along.

This also needs an explanation in the changelog about _why_
X86_FEATURE_SPLIT_LOCK_DETECT isn't set and can't be set. It needs to
explain why enumeration is not present *AND* is impossible to add.