lkml.org 
[lkml]   [2020]   [Feb]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v17] x86/split_lock: Enable split lock detection by kernel
Date
Sean Christopherson <sean.j.christopherson@intel.com> writes:

> On Sun, Jan 26, 2020 at 12:05:35PM -0800, Luck, Tony wrote:
>
> ...
>
>> +bool handle_user_split_lock(struct pt_regs *regs, long error_code)
>
> No reason to take the error code unless there's a plan to use it.
>
>> +{
>> + if ((regs->flags & X86_EFLAGS_AC) || sld_state == sld_fatal)
>> + return false;
>
> Any objection to moving the EFLAGS.AC up to do_alignment_check()? And
> take "unsigned long rip" instead of @regs?
>
> That would allow KVM to reuse handle_user_split_lock() for guest faults
> without any changes (other than exporting).
>
> E.g. do_alignment_check() becomes:
>
> if (!(regs->flags & X86_EFLAGS_AC) && handle_user_split_lock(regs->ip))
> return;

No objections.

Thanks,

tglx

\
 
 \ /
  Last update: 2020-02-04 13:53    [W:0.324 / U:1.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site