From patchwork Mon Mar 6 13:18:01 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Hildenbrand X-Patchwork-Id: 9606029 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1BEBC601D2 for ; Mon, 6 Mar 2017 13:27:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0A31C28304 for ; Mon, 6 Mar 2017 13:27:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F348728415; Mon, 6 Mar 2017 13:27:20 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A28E328304 for ; Mon, 6 Mar 2017 13:27:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753176AbdCFN1T (ORCPT ); Mon, 6 Mar 2017 08:27:19 -0500 Received: from mx1.redhat.com ([209.132.183.28]:59094 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752947AbdCFN1R (ORCPT ); Mon, 6 Mar 2017 08:27:17 -0500 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 22848C04B93B for ; Mon, 6 Mar 2017 13:18:29 +0000 (UTC) Received: from t460s.redhat.com (ovpn-117-19.ams2.redhat.com [10.36.117.19]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v26DIHqh027978; Mon, 6 Mar 2017 08:18:27 -0500 From: David Hildenbrand To: kvm@vger.kernel.org Cc: Paolo Bonzini , rkrcmar@redhat.com, david@redhat.com Subject: [PATCH RFC 07/21] KVM: x86: use ioapic_in_kernel() to check for ioapic existence Date: Mon, 6 Mar 2017 14:18:01 +0100 Message-Id: <20170306131815.12033-8-david@redhat.com> In-Reply-To: <20170306131815.12033-1-david@redhat.com> References: <20170306131815.12033-1-david@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Mon, 06 Mar 2017 13:18:29 +0000 (UTC) Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: David Hildenbrand --- arch/x86/kvm/ioapic.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/x86/kvm/ioapic.c b/arch/x86/kvm/ioapic.c index 3d9dc98..4fd234d 100644 --- a/arch/x86/kvm/ioapic.c +++ b/arch/x86/kvm/ioapic.c @@ -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); }