diff options
author | Alexander Graf <agraf@suse.de> | 2012-10-09 00:22:59 +0200 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2012-12-06 01:33:49 +0100 |
commit | 914daba865cb5c38cd5fdee024ca38029315b38f (patch) | |
tree | 5d0906d4fd82da801fb230256fc6bb1abb25bd0a /virt/kvm/eventfd.c | |
parent | 45e3cc7d9fe69844cd12d51c511e1e98d156bbe1 (diff) | |
download | linux-stable-914daba865cb5c38cd5fdee024ca38029315b38f.tar.gz linux-stable-914daba865cb5c38cd5fdee024ca38029315b38f.tar.bz2 linux-stable-914daba865cb5c38cd5fdee024ca38029315b38f.zip |
KVM: Distangle eventfd code from irqchip
The current eventfd code assumes that when we have eventfd, we also have
irqfd for in-kernel interrupt delivery. This is not necessarily true. On
PPC we don't have an in-kernel irqchip yet, but we can still support easily
support eventfd.
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'virt/kvm/eventfd.c')
-rw-r--r-- | virt/kvm/eventfd.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/virt/kvm/eventfd.c b/virt/kvm/eventfd.c index 9718e98d6d2a..d7424c8c138a 100644 --- a/virt/kvm/eventfd.c +++ b/virt/kvm/eventfd.c @@ -35,6 +35,7 @@ #include "iodev.h" +#ifdef __KVM_HAVE_IOAPIC /* * -------------------------------------------------------------------- * irqfd: Allows an fd to be used to inject an interrupt to the guest @@ -425,17 +426,21 @@ fail: kfree(irqfd); return ret; } +#endif void kvm_eventfd_init(struct kvm *kvm) { +#ifdef __KVM_HAVE_IOAPIC spin_lock_init(&kvm->irqfds.lock); INIT_LIST_HEAD(&kvm->irqfds.items); INIT_LIST_HEAD(&kvm->irqfds.resampler_list); mutex_init(&kvm->irqfds.resampler_lock); +#endif INIT_LIST_HEAD(&kvm->ioeventfds); } +#ifdef __KVM_HAVE_IOAPIC /* * shutdown any irqfd's that match fd+gsi */ @@ -555,6 +560,7 @@ static void __exit irqfd_module_exit(void) module_init(irqfd_module_init); module_exit(irqfd_module_exit); +#endif /* * -------------------------------------------------------------------- |