lkml.org 
[lkml]   [2021]   [Dec]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 02/19] x86/fpu: Prepare KVM for dynamically enabled states
From
On 12/8/21 01:03, Yang Zhong wrote:
> - user_xfeatures
>
> Track which features are currently enabled for the vCPU

Please rename to alloc_xfeatures

> - user_perm
>
> Copied from guest_perm of the group leader thread. The first
> vCPU which does the copy locks the guest_perm

Please rename to perm_xfeatures.

> - realloc_request
>
> KVM sets this field to request dynamically-enabled features
> which require reallocation of @fpstate

This field should be in vcpu->arch, and there is no need for
fpu_guest_realloc_fpstate. Rename __xfd_enable_feature to
fpu_enable_xfd_feature and add it to the public API, then just do

if (unlikely(vcpu->arch.xfd_realloc_request)) {
u64 request = vcpu->arch.xfd_realloc_request;
ret = fpu_enable_xfd(request, enter_guest);
}

to kvm_put_guest_fpu.

Paolo

\
 
 \ /
  Last update: 2021-12-13 10:13    [W:0.380 / U:0.288 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site