diff options
author | Radim Krčmář <rkrcmar@redhat.com> | 2014-11-27 20:03:14 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2014-12-04 15:29:06 +0100 |
commit | 698f9755d9c061865aecc52f590270ba5bbc1442 (patch) | |
tree | 6d90f484ccb3f240f0cc7354f52cab5a7b3ce9bf /arch/x86/kvm | |
parent | decdc28382b93dc642b83b32758b7440036cab76 (diff) |
KVM: x86: don't retry hopeless APIC delivery
False from kvm_irq_delivery_to_apic_fast() means that we don't handle it
in the fast path, but we still return false in cases that were perfectly
handled, fix that.
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm')
-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 3634303218a3..f6184f1f13c3 100644 --- a/arch/x86/kvm/lapic.c +++ b/arch/x86/kvm/lapic.c @@ -690,6 +690,8 @@ bool kvm_irq_delivery_to_apic_fast(struct kvm *kvm, struct kvm_lapic *src, if (irq->dest_id == map->broadcast) goto out; + ret = true; + if (irq->dest_mode == 0) { /* physical mode */ if (irq->delivery_mode == APIC_DM_LOWEST) goto out; @@ -723,8 +725,6 @@ bool kvm_irq_delivery_to_apic_fast(struct kvm *kvm, struct kvm_lapic *src, *r = 0; *r += kvm_apic_set_irq(dst[i]->vcpu, irq, dest_map); } - - ret = true; out: rcu_read_unlock(); return ret; |