Re: [PATCH v9 13/17] x86/split_lock: Disable split lock detection by kernel parameter "nosplit_lock_detect"
From: Thomas Gleixner
Date: Wed Jun 26 2019 - 16:35:09 EST
On Tue, 18 Jun 2019, Fenghua Yu wrote:
>
> static void split_lock_update_msr(void)
> {
> - /* Enable split lock detection */
> - this_cpu_or(msr_test_ctl_cached, MSR_TEST_CTL_SPLIT_LOCK_DETECT);
> + if (split_lock_detect_enabled) {
> + /* Enable split lock detection */
> + this_cpu_or(msr_test_ctl_cached, MSR_TEST_CTL_SPLIT_LOCK_DETECT);
> + } else {
> + /* Disable split lock detection */
Could you please comment the non obvious things and not the obvious ones?
> + this_cpu_and(msr_test_ctl_cached, ~MSR_TEST_CTL_SPLIT_LOCK_DETECT);
It's entirely clear that the if (enabled) path enables it or am I missing
something?
Thanks,
tglx