From: Christian Borntraeger Subject: Re: [PATCH] kvm: declare kvm_ioapic in kvm_host.h Date: Thu, 26 Feb 2009 13:55:33 +0100 Message-ID: <200902261355.33403.borntraeger@de.ibm.com> References: <1235553536-32690-1-git-send-email-sheng@linux.intel.com> <200902261339.36237.borntraeger@de.ibm.com> <49A68E8A.7040404@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Cc: Sheng Yang , Marcelo Tosatti , Gleb Natapov , kvm@vger.kernel.org To: Avi Kivity Return-path: Received: from mtagate2.uk.ibm.com ([194.196.100.162]:52632 "EHLO mtagate2.uk.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751949AbZBZMzg (ORCPT ); Thu, 26 Feb 2009 07:55:36 -0500 Received: from d06nrmr1407.portsmouth.uk.ibm.com (d06nrmr1407.portsmouth.uk.ibm.com [9.149.38.185]) by mtagate2.uk.ibm.com (8.13.1/8.13.1) with ESMTP id n1QCtYNx000810 for ; Thu, 26 Feb 2009 12:55:34 GMT Received: from d06av01.portsmouth.uk.ibm.com (d06av01.portsmouth.uk.ibm.com [9.149.37.212]) by d06nrmr1407.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v9.2) with ESMTP id n1QCtYNu3084424 for ; Thu, 26 Feb 2009 12:55:34 GMT Received: from d06av01.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av01.portsmouth.uk.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id n1QCtXWa002282 for ; Thu, 26 Feb 2009 12:55:34 GMT In-Reply-To: <49A68E8A.7040404@redhat.com> Content-Disposition: inline Sender: kvm-owner@vger.kernel.org List-ID: Am Thursday 26 February 2009 13:43:54 schrieb Avi Kivity: > > Declaring struct kvm_ioapic should help. > Better to limit the declaration to archs that have ioapics... do we have > a KVM_HAVE_IOAPIC define? Something like (works on s390, not tested on x86)? [PATCH] kvm: use ioapic functions only on affected hardware From: Christian Borntraeger Since " KVM: Unify the delivery of IOAPIC and MSI interrupts" I get the following warnings: CC [M] arch/s390/kvm/kvm-s390.o In file included from arch/s390/kvm/kvm-s390.c:22: include/linux/kvm_host.h:357: warning: 'struct kvm_ioapic' declared inside parameter list include/linux/kvm_host.h:357: warning: its scope is only this definition or declaration, which is probably not what you want This patch limits IOAPIC functions for architectures that have one. Signed-off-by: Christian Borntraeger --- include/linux/kvm_host.h | 2 ++ 1 file changed, 2 insertions(+) Index: kvm/include/linux/kvm_host.h =================================================================== --- kvm.orig/include/linux/kvm_host.h +++ kvm/include/linux/kvm_host.h @@ -352,9 +352,11 @@ void kvm_unregister_irq_mask_notifier(st struct kvm_irq_mask_notifier *kimn); void kvm_fire_mask_notifiers(struct kvm *kvm, int irq, bool mask); +#ifdef __KVM_HAVE_IOAPIC void kvm_get_intr_delivery_bitmask(struct kvm_ioapic *ioapic, union kvm_ioapic_redirect_entry *entry, unsigned long *deliver_bitmask); +#endif int kvm_set_irq(struct kvm *kvm, int irq_source_id, int irq, int level); void kvm_notify_acked_irq(struct kvm *kvm, unsigned irqchip, unsigned pin); void kvm_register_irq_ack_notifier(struct kvm *kvm,