diff options
author | Alexander Graf <agraf@suse.de> | 2013-04-16 17:42:19 +0200 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2013-04-26 20:27:25 +0200 |
commit | de9ba2f36368d21314860ee24893a6ffef01e548 (patch) | |
tree | 32b5a67e3c6e1b4d74f7411910acf92549cb1e4f /arch/powerpc/kvm/irq.h | |
parent | kvm/ppc/mpic: add KVM_CAP_IRQ_MPIC (diff) | |
download | linux-de9ba2f36368d21314860ee24893a6ffef01e548.tar.xz linux-de9ba2f36368d21314860ee24893a6ffef01e548.zip |
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>
Diffstat (limited to 'arch/powerpc/kvm/irq.h')
-rw-r--r-- | arch/powerpc/kvm/irq.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/arch/powerpc/kvm/irq.h b/arch/powerpc/kvm/irq.h new file mode 100644 index 000000000000..f1e27fdc8c2e --- /dev/null +++ b/arch/powerpc/kvm/irq.h @@ -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 |