KVM: PPC: Support irq routing and irqfd for in-kernel MPIC

Now that all the irq routing and irqfd pieces are generic, we can expose
real irqchip support to all of KVM's internal helpers.

This allows us to use irqfd with the in-kernel MPIC.

Signed-off-by: Alexander Graf <agraf@suse.de>
This commit is contained in:
Alexander Graf
2013-04-16 17:42:19 +02:00
parent eb1e4f43e0
commit de9ba2f363
7 changed files with 158 additions and 1 deletions

17
arch/powerpc/kvm/irq.h Normal file
View File

@@ -0,0 +1,17 @@
#ifndef __IRQ_H
#define __IRQ_H
#include <linux/kvm_host.h>
static inline int irqchip_in_kernel(struct kvm *kvm)
{
int ret = 0;
#ifdef CONFIG_KVM_MPIC
ret = ret || (kvm->arch.mpic != NULL);
#endif
smp_rmb();
return ret;
}
#endif