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

Reply via email to