Merge tag 'kvm-x86-pmu-6.4' of https://github.com/kvm-x86/linux into HEAD
[sfrench/cifs-2.6.git] / arch / x86 / kvm / cpuid.c
index 6972e0be60faaeb327ebd5d0bba5b2704447470f..b944492faefa332bf7d4ad865c3ac12da452eac0 100644 (file)
@@ -414,7 +414,7 @@ static int kvm_set_cpuid(struct kvm_vcpu *vcpu, struct kvm_cpuid_entry2 *e2,
         * KVM_SET_CPUID{,2} again. To support this legacy behavior, check
         * whether the supplied CPUID data is equal to what's already set.
         */
-       if (vcpu->arch.last_vmentry_cpu != -1) {
+       if (kvm_vcpu_has_run(vcpu)) {
                r = kvm_cpuid_check_equal(vcpu, e2, nent);
                if (r)
                        return r;