summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kvm/irq.h
blob: 3f1be85a83bcf94424d7957c651f217c4ef47433 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#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
#ifdef CONFIG_KVM_XICS
	ret = ret || (kvm->arch.xics != NULL);
	ret = ret || (kvm->arch.xive != NULL);
#endif
	smp_rmb();
	return ret;
}

#endif