]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
KVM: X86: Fix kvm_bitmap_or_dest_vcpus() to use irq shorthand
authorPeter Xu <peterx@redhat.com>
Wed, 4 Dec 2019 19:07:16 +0000 (20:07 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 5 Mar 2020 15:45:23 +0000 (16:45 +0100)
commit b4b2963616bbd91ebb33148522552e1135de56ae upstream.

The 3rd parameter of kvm_apic_match_dest() is the irq shorthand,
rather than the irq delivery mode.

Fixes: 7ee30bc132c6 ("KVM: x86: deliver KVM IOAPIC scan request to target vCPUs")
Reviewed-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/kvm/lapic.c

index f05123acaa64c3cc2db7a2e4457c028b00309ece..a1daebe2a60f1c607a33d06f0ffbaba10abc7ae6 100644 (file)
@@ -1150,7 +1150,7 @@ void kvm_bitmap_or_dest_vcpus(struct kvm *kvm, struct kvm_lapic_irq *irq,
                        if (!kvm_apic_present(vcpu))
                                continue;
                        if (!kvm_apic_match_dest(vcpu, NULL,
-                                                irq->delivery_mode,
+                                                irq->shorthand,
                                                 irq->dest_id,
                                                 irq->dest_mode))
                                continue;