lkml.org 
[lkml]   [2021]   [Dec]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v2 22/23] kvm: x86: Disable interception for IA32_XFD on demand
From
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:

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-20 10:08    [W:0.183 / U:1.228 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site