Commit | Line | Data |
---|---|---|
1a89dd91 MZ |
1 | /* |
2 | * Copyright (C) 2012 ARM Ltd. | |
3 | * Author: Marc Zyngier <marc.zyngier@arm.com> | |
4 | * | |
5 | * This program is free software; you can redistribute it and/or modify | |
6 | * it under the terms of the GNU General Public License version 2 as | |
7 | * published by the Free Software Foundation. | |
8 | * | |
9 | * This program is distributed in the hope that it will be useful, | |
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
12 | * GNU General Public License for more details. | |
13 | * | |
14 | * You should have received a copy of the GNU General Public License | |
15 | * along with this program; if not, write to the Free Software | |
16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
17 | */ | |
18 | ||
19 | #ifndef __ASM_ARM_KVM_VGIC_H | |
20 | #define __ASM_ARM_KVM_VGIC_H | |
21 | ||
22 | #include <linux/irqchip/arm-gic.h> | |
23 | ||
24 | struct vgic_dist { | |
25 | }; | |
26 | ||
27 | struct vgic_cpu { | |
28 | }; | |
29 | ||
30 | struct kvm; | |
31 | struct kvm_vcpu; | |
32 | struct kvm_run; | |
33 | struct kvm_exit_mmio; | |
34 | ||
35 | #ifdef CONFIG_KVM_ARM_VGIC | |
36 | bool vgic_handle_mmio(struct kvm_vcpu *vcpu, struct kvm_run *run, | |
37 | struct kvm_exit_mmio *mmio); | |
38 | ||
39 | #else | |
40 | static inline int kvm_vgic_hyp_init(void) | |
41 | { | |
42 | return 0; | |
43 | } | |
44 | ||
45 | static inline int kvm_vgic_init(struct kvm *kvm) | |
46 | { | |
47 | return 0; | |
48 | } | |
49 | ||
50 | static inline int kvm_vgic_create(struct kvm *kvm) | |
51 | { | |
52 | return 0; | |
53 | } | |
54 | ||
55 | static inline int kvm_vgic_vcpu_init(struct kvm_vcpu *vcpu) | |
56 | { | |
57 | return 0; | |
58 | } | |
59 | ||
60 | static inline void kvm_vgic_flush_hwstate(struct kvm_vcpu *vcpu) {} | |
61 | static inline void kvm_vgic_sync_hwstate(struct kvm_vcpu *vcpu) {} | |
62 | ||
63 | static inline int kvm_vgic_vcpu_pending_irq(struct kvm_vcpu *vcpu) | |
64 | { | |
65 | return 0; | |
66 | } | |
67 | ||
68 | static inline bool vgic_handle_mmio(struct kvm_vcpu *vcpu, struct kvm_run *run, | |
69 | struct kvm_exit_mmio *mmio) | |
70 | { | |
71 | return false; | |
72 | } | |
73 | ||
74 | static inline int irqchip_in_kernel(struct kvm *kvm) | |
75 | { | |
76 | return 0; | |
77 | } | |
78 | #endif | |
79 | ||
80 | #endif |