Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @@ -5929,6 +6018,14 @@ static void svm_cpuid_update(struct kvm_vcpu *vcpu)
- return;
- guest_cpuid_clear(vcpu, X86_FEATURE_X2APIC);
- +
- + /*
- + * Currently, AVIC does not work with nested virtualization.
- + * So, we disable AVIC when cpuid for SVM is set in the L1 guest.
- + */
- + if (nested && guest_cpuid_has(vcpu, X86_FEATURE_SVM))
- + kvm_request_apicv_update(vcpu->kvm, false,
- + APICV_INHIBIT_REASON_NESTED);
- }
- #define F feature_bit
- @@ -9219,10 +9267,11 @@ int kvm_arch_vcpu_create(struct kvm_vcpu *vcpu)
- return r;
- if (irqchip_in_kernel(vcpu->kvm)) {
- - vcpu->arch.apicv_active = kvm_x86_ops->get_enable_apicv(vcpu->kvm);
- r = kvm_create_lapic(vcpu, lapic_timer_advance_ns);
- if (r < 0)
- goto fail_mmu_destroy;
- + if (kvm_apicv_activated(vcpu->kvm))
- + vcpu->arch.apicv_active = true;
- } else
- static_key_slow_inc(&kvm_no_apic_vcpu);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement