Message ID | 20170616134348.17725-15-alazar@bitdefender.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 5298f93412db..248fb7e99423 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -728,6 +728,10 @@ static int __kvm_set_xcr(struct kvm_vcpu *vcpu, u32 index, u64 xcr) if ((xcr0 & XFEATURE_MASK_AVX512) != XFEATURE_MASK_AVX512) return 1; } + + if (xcr0 != old_xcr0) + kvmi_xsetbv_event(vcpu, xcr); + vcpu->arch.xcr0 = xcr0; if ((xcr0 ^ old_xcr0) & XFEATURE_MASK_EXTEND)