KVM: x86: use ioapic_in_kernel() to check for ioapic existence
authorDavid Hildenbrand <david@redhat.com>
Fri, 7 Apr 2017 08:50:25 +0000 (10:50 +0200)
committerRadim Krčmář <rkrcmar@redhat.com>
Wed, 12 Apr 2017 18:17:13 +0000 (20:17 +0200)
Signed-off-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
arch/x86/kvm/ioapic.c

index a433317d57872b79c63dfa5ee46ed162b2756505..da66650e3313296d038fcbda7250339286a54689 100644 (file)
@@ -268,9 +268,7 @@ void kvm_ioapic_scan_entry(struct kvm_vcpu *vcpu, ulong *ioapic_handled_vectors)
 
 void kvm_vcpu_request_scan_ioapic(struct kvm *kvm)
 {
-       struct kvm_ioapic *ioapic = kvm->arch.vioapic;
-
-       if (!ioapic)
+       if (!ioapic_in_kernel(kvm))
                return;
        kvm_make_scan_ioapic_request(kvm);
 }