Commit | Line | Data |
---|---|---|
b2441318 | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
de9ba2f3 AG |
2 | #ifndef __IRQ_H |
3 | #define __IRQ_H | |
4 | ||
5 | #include <linux/kvm_host.h> | |
6 | ||
7 | static inline int irqchip_in_kernel(struct kvm *kvm) | |
8 | { | |
9 | int ret = 0; | |
10 | ||
11 | #ifdef CONFIG_KVM_MPIC | |
12 | ret = ret || (kvm->arch.mpic != NULL); | |
5975a2e0 PM |
13 | #endif |
14 | #ifdef CONFIG_KVM_XICS | |
15 | ret = ret || (kvm->arch.xics != NULL); | |
5af50993 | 16 | ret = ret || (kvm->arch.xive != NULL); |
de9ba2f3 AG |
17 | #endif |
18 | smp_rmb(); | |
19 | return ret; | |
20 | } | |
21 | ||
22 | #endif |