]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86: add kvm_apic_map_get_dest_lapic
authorRadim Krčmář <rkrcmar@redhat.com>
Tue, 12 Jul 2016 20:09:18 +0000 (22:09 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 14 Jul 2016 07:03:51 +0000 (09:03 +0200)
commit4a5f5508c4f09ecaa4e7cd71bc0746b4c286d502
treed925b3525c76fde3eab4e3f9b120b2613152945c
parentd4f908e460b3b075ed1b0dd996a6f7ec3a403fc6
KVM: x86: add kvm_apic_map_get_dest_lapic

kvm_irq_delivery_to_apic_fast and kvm_intr_is_single_vcpu_fast both
compute the interrupt destination.  Factor the code.

'struct kvm_lapic **dst = NULL' had to be added to silence GCC.
GCC might complain about potential NULL access in the future, because it
missed conditions that avoided uninitialized uses of dst.

Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/lapic.c