From: David Hildenbrand Subject: [PATCH v2 24/24] KVM: x86: use irqchip_kernel() to check for pic+ioapic Date: Thu, 23 Mar 2017 15:13:57 +0100 Message-ID: <20170323141357.12144-25-david@redhat.com> References: <20170323141357.12144-1-david@redhat.com> Cc: Paolo Bonzini , rkrcmar@redhat.com, Peter Xu , david@redhat.com To: kvm@vger.kernel.org Return-path: Received: from mx1.redhat.com ([209.132.183.28]:39178 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965047AbdCWOPS (ORCPT ); Thu, 23 Mar 2017 10:15:18 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id AD6C681F03 for ; Thu, 23 Mar 2017 14:15:13 +0000 (UTC) In-Reply-To: <20170323141357.12144-1-david@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: Although the current check is not wrong, this check explicitly includes the pic. Signed-off-by: David Hildenbrand --- arch/x86/kvm/irq_comm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kvm/irq_comm.c b/arch/x86/kvm/irq_comm.c index 1728ff1..5494395 100644 --- a/arch/x86/kvm/irq_comm.c +++ b/arch/x86/kvm/irq_comm.c @@ -232,7 +232,7 @@ void kvm_free_irq_source_id(struct kvm *kvm, int irq_source_id) goto unlock; } clear_bit(irq_source_id, &kvm->arch.irq_sources_bitmap); - if (!ioapic_in_kernel(kvm)) + if (!irqchip_kernel(kvm)) goto unlock; kvm_ioapic_clear_all(kvm->arch.vioapic, irq_source_id); -- 2.9.3