lkml.org 
[lkml]   [2021]   [Dec]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH v2 22/23] kvm: x86: Disable interception for IA32_XFD on demand
Date
On 12/20/2021 5:07 PM, Paolo Bonzini wrote:
>
> On 12/17/21 16:30, Jing Liu wrote:
> > +++ b/arch/x86/kvm/x86.c
> > @@ -3686,6 +3686,9 @@ int kvm_set_msr_common(struct kvm_vcpu
> *vcpu, struct msr_data *msr_info)
> > return 1;
> >
> > fpu_update_guest_xfd(&vcpu->arch.guest_fpu, data);
> > +
> > + if (data && kvm_x86_ops.set_xfd_passthrough)
> > + static_call(kvm_x86_set_xfd_passthrough)(vcpu);
> > break;
> > case MSR_IA32_XFD_ERR:
>
>
> Please instead add a "case" to vmx_set_msr:

OK, it seems the passthrough setup is preferred in vmx.c.
Do we also want a case in vmx_get_msr (for patch 11), even though
no specific handling there?

Thanks,
Jing


>
> case MSR_IA32_XFD:
> ret = kvm_set_msr_common(vcpu, msr_info);
> if (!ret && data) {
> vmx_disable_intercept_for_msr(vcpu,
> MSR_IA32_XFD, MSR_TYPE_RW);
> vcpu->arch.xfd_out_of_sync = true;
> }
> break;
>
> Paolo
\
 
 \ /
  Last update: 2021-12-21 07:42    [W:0.079 / U:1.824 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site