RE: [PATCH v12] x86/split_lock: Enable split lock detection by kernel

From: Luck, Tony
Date: Wed Jan 22 2020 - 15:03:41 EST


>> +#define X86_FEATURE_SPLIT_LOCK_DETECT ( 7*32+31) /* #AC for split lock */
>
> That word is already full in tip:
> ...
> use word 11 instead.

Will rebase against tip/master and move to word 11.

>> +#define MSR_IA32_CORE_CAPABILITIES 0x000000cf
>> +#define MSR_IA32_CORE_CAPABILITIES_SPLIT_LOCK_DETECT_BIT 5
>> +#define MSR_IA32_CORE_CAPABILITIES_SPLIT_LOCK_DETECT BIT(MSR_IA32_CORE_CAPABILITIES_SPLIT_LOCK_DETECT_BIT)
>
> Any chance making those shorter?

I could abbreviate CAPABILITIES as "CAP", that would save 9 characters. Is that enough?

I'm not fond of the "remove the vowels": SPLT_LCK_DTCT, but that is sort of readable
and would save 4 more. What do you think?

-Tony