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