diff mbox

kvm: declare kvm_ioapic in kvm_host.h

Message ID 200902261355.33403.borntraeger@de.ibm.com (mailing list archive)
State New, archived
Headers show

Commit Message

Christian Borntraeger Feb. 26, 2009, 12:55 p.m. UTC
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 <borntraeger@de.ibm.com>

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 <borntraeger@de.ibm.com>
---
 include/linux/kvm_host.h |    2 ++
 1 file changed, 2 insertions(+)

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Avi Kivity Feb. 26, 2009, 1:01 p.m. UTC | #1
Christian Borntraeger wrote:
> 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)?
>   

Exactly, applied, thanks.
diff mbox

Patch

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,