lkml.org 
[lkml]   [2021]   [May]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] KVM: x86: add hint to skip hidden rdpkru under kvm_load_host_xsave_state
Date


> On May 7, 2021, at 12:58 PM, Dave Hansen <dave.hansen@intel.com> wrote:
>
> On 5/7/21 9:52 AM, Paolo Bonzini wrote:
>> This can be optimized as well, can't it? This means that the only case
>> that needs the rdpkru is in switch_fpu_finish, and __write_pkru can be
>> removed completely:
>>
>> - do the rdpkru+wrpkru in switch_fpu_finish
>>
>> - just use wrpkru in KVM
>
> I was going to suggest exactly the same thing. It doesn't require the
> compiler to be smart, and wrpkru() is available in the same header as
> __write_pkru().

Thanks Paolo, Dave. Good suggestion, I’ll work up a v2 and send it out.

>
> I also detest the mysterious true/false arguments to functions where you
> have no clue what they're doing at the call site without comments.

Noted, my apologies. Thats a good point, I won’t make that mistake again.

\
 
 \ /
  Last update: 2021-05-07 19:17    [W:1.202 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site