KVM: x86: consolidate different ways to test for in-kernel LAPIC
authorPaolo Bonzini <pbonzini@redhat.com>
Fri, 8 Jan 2016 12:48:51 +0000 (13:48 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 9 Feb 2016 15:57:45 +0000 (16:57 +0100)
commitbce87cce88c71957c56479809db8316a836ec8b1
tree78e141c6b3cac15f9aae3f0384d401d38cf4ba87
parent1e3161b4147caf2045ac4aae3d71fae6ac1a1d65
KVM: x86: consolidate different ways to test for in-kernel LAPIC

Different pieces of code checked for vcpu->arch.apic being (non-)NULL,
or used kvm_vcpu_has_lapic (more optimized) or lapic_in_kernel.
Replace everything with lapic_in_kernel's name and kvm_vcpu_has_lapic's
implementation.

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