lkml.org 
[lkml]   [2021]   [May]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] KVM: x86: add hint to skip hidden rdpkru under kvm_load_host_xsave_state
From
Date
On 5/17/21 10:49 AM, Andy Lutomirski wrote:
>> The least awful solution would be to have the NMI handler restore
>> the host's PKRU. The NMI handler would need to save/restore the
>> register, a la CR2, but the whole thing could be optimized to run
>> if and only if the NMI lands in the window where the guest's PKRU
>> is loaded.
>
> Or set a flag causing nmi_uaccess_ok() to return false.

Oh, that doesn't sound too bad. The VMENTER/EXIT paths are also
essentially a context switch.

Will widening the window where nmi_uaccess_okay()==false anger any of
the perf folks? It looks like perf knows how to handle it nicely.

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