diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2015-07-29 09:49:59 (GMT) |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2015-10-01 13:06:24 (GMT) |
commit | d50ab6c1a2b24e12d3012d7beb343eba5b94a6ca (patch) | |
tree | f1c08677a8b33c0a9cbcd816cd5d603de486b340 /arch/x86/kvm/lapic.c | |
parent | 3bb345f387dd26beb097cf776e342bc0d96d805a (diff) | |
download | linux-d50ab6c1a2b24e12d3012d7beb343eba5b94a6ca.tar.xz |
KVM: x86: replace vm_has_apicv hook with cpu_uses_apicv
This will avoid an unnecessary trip to ->kvm and from there to the VPIC.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/lapic.c')
-rw-r--r-- | arch/x86/kvm/lapic.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c index 4c30fb0..c568d69 100644 --- a/arch/x86/kvm/lapic.c +++ b/arch/x86/kvm/lapic.c @@ -390,7 +390,7 @@ static inline void apic_clear_irr(int vec, struct kvm_lapic *apic) vcpu = apic->vcpu; - if (unlikely(kvm_apic_vid_enabled(vcpu->kvm))) { + if (unlikely(kvm_vcpu_apic_vid_enabled(vcpu))) { /* try to update RVI */ apic_clear_vector(vec, apic->regs + APIC_IRR); kvm_make_request(KVM_REQ_EVENT, vcpu); @@ -1622,7 +1622,7 @@ void kvm_lapic_reset(struct kvm_vcpu *vcpu, bool init_event) apic_set_reg(apic, APIC_ISR + 0x10 * i, 0); apic_set_reg(apic, APIC_TMR + 0x10 * i, 0); } - apic->irr_pending = kvm_apic_vid_enabled(vcpu->kvm); + apic->irr_pending = kvm_vcpu_apic_vid_enabled(vcpu); apic->isr_count = kvm_x86_ops->hwapic_isr_update ? 1 : 0; apic->highest_isr_cache = -1; update_divide_count(apic); |