diff options
-rw-r--r-- | arch/arm/include/asm/kvm_host.h | 7 | ||||
-rw-r--r-- | arch/arm64/include/asm/kvm_host.h | 6 | ||||
-rw-r--r-- | arch/ia64/include/asm/kvm_host.h | 3 | ||||
-rw-r--r-- | arch/mips/include/asm/kvm_host.h | 5 | ||||
-rw-r--r-- | arch/powerpc/include/asm/kvm_host.h | 5 | ||||
-rw-r--r-- | arch/s390/include/asm/kvm_host.h | 5 | ||||
-rw-r--r-- | arch/x86/include/asm/kvm_host.h | 4 | ||||
-rw-r--r-- | include/linux/kvm_host.h | 6 | ||||
-rw-r--r-- | include/linux/kvm_types.h | 14 |
9 files changed, 21 insertions, 34 deletions
diff --git a/arch/arm/include/asm/kvm_host.h b/arch/arm/include/asm/kvm_host.h index 6dfb404f6c46..4843397b812c 100644 --- a/arch/arm/include/asm/kvm_host.h +++ b/arch/arm/include/asm/kvm_host.h | |||
@@ -19,6 +19,8 @@ | |||
19 | #ifndef __ARM_KVM_HOST_H__ | 19 | #ifndef __ARM_KVM_HOST_H__ |
20 | #define __ARM_KVM_HOST_H__ | 20 | #define __ARM_KVM_HOST_H__ |
21 | 21 | ||
22 | #include <linux/types.h> | ||
23 | #include <linux/kvm_types.h> | ||
22 | #include <asm/kvm.h> | 24 | #include <asm/kvm.h> |
23 | #include <asm/kvm_asm.h> | 25 | #include <asm/kvm_asm.h> |
24 | #include <asm/kvm_mmio.h> | 26 | #include <asm/kvm_mmio.h> |
@@ -40,7 +42,6 @@ | |||
40 | 42 | ||
41 | #include <kvm/arm_vgic.h> | 43 | #include <kvm/arm_vgic.h> |
42 | 44 | ||
43 | struct kvm_vcpu; | ||
44 | u32 *kvm_vcpu_reg(struct kvm_vcpu *vcpu, u8 reg_num, u32 mode); | 45 | u32 *kvm_vcpu_reg(struct kvm_vcpu *vcpu, u8 reg_num, u32 mode); |
45 | int kvm_target_cpu(void); | 46 | int kvm_target_cpu(void); |
46 | int kvm_reset_vcpu(struct kvm_vcpu *vcpu); | 47 | int kvm_reset_vcpu(struct kvm_vcpu *vcpu); |
@@ -149,20 +150,17 @@ struct kvm_vcpu_stat { | |||
149 | u32 halt_wakeup; | 150 | u32 halt_wakeup; |
150 | }; | 151 | }; |
151 | 152 | ||
152 | struct kvm_vcpu_init; | ||
153 | int kvm_vcpu_set_target(struct kvm_vcpu *vcpu, | 153 | int kvm_vcpu_set_target(struct kvm_vcpu *vcpu, |
154 | const struct kvm_vcpu_init *init); | 154 | const struct kvm_vcpu_init *init); |
155 | int kvm_vcpu_preferred_target(struct kvm_vcpu_init *init); | 155 | int kvm_vcpu_preferred_target(struct kvm_vcpu_init *init); |
156 | unsigned long kvm_arm_num_regs(struct kvm_vcpu *vcpu); | 156 | unsigned long kvm_arm_num_regs(struct kvm_vcpu *vcpu); |
157 | int kvm_arm_copy_reg_indices(struct kvm_vcpu *vcpu, u64 __user *indices); | 157 | int kvm_arm_copy_reg_indices(struct kvm_vcpu *vcpu, u64 __user *indices); |
158 | struct kvm_one_reg; | ||
159 | int kvm_arm_get_reg(struct kvm_vcpu *vcpu, const struct kvm_one_reg *reg); | 158 | int kvm_arm_get_reg(struct kvm_vcpu *vcpu, const struct kvm_one_reg *reg); |
160 | int kvm_arm_set_reg(struct kvm_vcpu *vcpu, const struct kvm_one_reg *reg); | 159 | int kvm_arm_set_reg(struct kvm_vcpu *vcpu, const struct kvm_one_reg *reg); |
161 | u64 kvm_call_hyp(void *hypfn, ...); | 160 | u64 kvm_call_hyp(void *hypfn, ...); |
162 | void force_vm_exit(const cpumask_t *mask); | 161 | void force_vm_exit(const cpumask_t *mask); |
163 | 162 | ||
164 | #define KVM_ARCH_WANT_MMU_NOTIFIER | 163 | #define KVM_ARCH_WANT_MMU_NOTIFIER |
165 | struct kvm; | ||
166 | int kvm_unmap_hva(struct kvm *kvm, unsigned long hva); | 164 | int kvm_unmap_hva(struct kvm *kvm, unsigned long hva); |
167 | int kvm_unmap_hva_range(struct kvm *kvm, | 165 | int kvm_unmap_hva_range(struct kvm *kvm, |
168 | unsigned long start, unsigned long end); | 166 | unsigned long start, unsigned long end); |
@@ -187,7 +185,6 @@ struct kvm_vcpu __percpu **kvm_get_running_vcpus(void); | |||
187 | 185 | ||
188 | int kvm_arm_copy_coproc_indices(struct kvm_vcpu *vcpu, u64 __user *uindices); | 186 | int kvm_arm_copy_coproc_indices(struct kvm_vcpu *vcpu, u64 __user *uindices); |
189 | unsigned long kvm_arm_num_coproc_regs(struct kvm_vcpu *vcpu); | 187 | unsigned long kvm_arm_num_coproc_regs(struct kvm_vcpu *vcpu); |
190 | struct kvm_one_reg; | ||
191 | int kvm_arm_coproc_get_reg(struct kvm_vcpu *vcpu, const struct kvm_one_reg *); | 188 | int kvm_arm_coproc_get_reg(struct kvm_vcpu *vcpu, const struct kvm_one_reg *); |
192 | int kvm_arm_coproc_set_reg(struct kvm_vcpu *vcpu, const struct kvm_one_reg *); | 189 | int kvm_arm_coproc_set_reg(struct kvm_vcpu *vcpu, const struct kvm_one_reg *); |
193 | 190 | ||
diff --git a/arch/arm64/include/asm/kvm_host.h b/arch/arm64/include/asm/kvm_host.h index e10c45a578e3..766147baae0b 100644 --- a/arch/arm64/include/asm/kvm_host.h +++ b/arch/arm64/include/asm/kvm_host.h | |||
@@ -22,6 +22,8 @@ | |||
22 | #ifndef __ARM64_KVM_HOST_H__ | 22 | #ifndef __ARM64_KVM_HOST_H__ |
23 | #define __ARM64_KVM_HOST_H__ | 23 | #define __ARM64_KVM_HOST_H__ |
24 | 24 | ||
25 | #include <linux/types.h> | ||
26 | #include <linux/kvm_types.h> | ||
25 | #include <asm/kvm.h> | 27 | #include <asm/kvm.h> |
26 | #include <asm/kvm_asm.h> | 28 | #include <asm/kvm_asm.h> |
27 | #include <asm/kvm_mmio.h> | 29 | #include <asm/kvm_mmio.h> |
@@ -41,7 +43,6 @@ | |||
41 | 43 | ||
42 | #define KVM_VCPU_MAX_FEATURES 3 | 44 | #define KVM_VCPU_MAX_FEATURES 3 |
43 | 45 | ||
44 | struct kvm_vcpu; | ||
45 | int kvm_target_cpu(void); | 46 | int kvm_target_cpu(void); |
46 | int kvm_reset_vcpu(struct kvm_vcpu *vcpu); | 47 | int kvm_reset_vcpu(struct kvm_vcpu *vcpu); |
47 | int kvm_arch_dev_ioctl_check_extension(long ext); | 48 | int kvm_arch_dev_ioctl_check_extension(long ext); |
@@ -164,18 +165,15 @@ struct kvm_vcpu_stat { | |||
164 | u32 halt_wakeup; | 165 | u32 halt_wakeup; |
165 | }; | 166 | }; |
166 | 167 | ||
167 | struct kvm_vcpu_init; | ||
168 | int kvm_vcpu_set_target(struct kvm_vcpu *vcpu, | 168 | int kvm_vcpu_set_target(struct kvm_vcpu *vcpu, |
169 | const struct kvm_vcpu_init *init); | 169 | const struct kvm_vcpu_init *init); |
170 | int kvm_vcpu_preferred_target(struct kvm_vcpu_init *init); | 170 | int kvm_vcpu_preferred_target(struct kvm_vcpu_init *init); |
171 | unsigned long kvm_arm_num_regs(struct kvm_vcpu *vcpu); | 171 | unsigned long kvm_arm_num_regs(struct kvm_vcpu *vcpu); |
172 | int kvm_arm_copy_reg_indices(struct kvm_vcpu *vcpu, u64 __user *indices); | 172 | int kvm_arm_copy_reg_indices(struct kvm_vcpu *vcpu, u64 __user *indices); |
173 | struct kvm_one_reg; | ||
174 | int kvm_arm_get_reg(struct kvm_vcpu *vcpu, const struct kvm_one_reg *reg); | 173 | int kvm_arm_get_reg(struct kvm_vcpu *vcpu, const struct kvm_one_reg *reg); |
175 | int kvm_arm_set_reg(struct kvm_vcpu *vcpu, const struct kvm_one_reg *reg); | 174 | int kvm_arm_set_reg(struct kvm_vcpu *vcpu, const struct kvm_one_reg *reg); |
176 | 175 | ||
177 | #define KVM_ARCH_WANT_MMU_NOTIFIER | 176 | #define KVM_ARCH_WANT_MMU_NOTIFIER |
178 | struct kvm; | ||
179 | int kvm_unmap_hva(struct kvm *kvm, unsigned long hva); | 177 | int kvm_unmap_hva(struct kvm *kvm, unsigned long hva); |
180 | int kvm_unmap_hva_range(struct kvm *kvm, | 178 | int kvm_unmap_hva_range(struct kvm *kvm, |
181 | unsigned long start, unsigned long end); | 179 | unsigned long start, unsigned long end); |
diff --git a/arch/ia64/include/asm/kvm_host.h b/arch/ia64/include/asm/kvm_host.h index db95f570705f..fccc09d04649 100644 --- a/arch/ia64/include/asm/kvm_host.h +++ b/arch/ia64/include/asm/kvm_host.h | |||
@@ -234,9 +234,6 @@ struct kvm_vm_data { | |||
234 | #define KVM_REQ_PTC_G 32 | 234 | #define KVM_REQ_PTC_G 32 |
235 | #define KVM_REQ_RESUME 33 | 235 | #define KVM_REQ_RESUME 33 |
236 | 236 | ||
237 | struct kvm; | ||
238 | struct kvm_vcpu; | ||
239 | |||
240 | struct kvm_mmio_req { | 237 | struct kvm_mmio_req { |
241 | uint64_t addr; /* physical address */ | 238 | uint64_t addr; /* physical address */ |
242 | uint64_t size; /* size in bytes */ | 239 | uint64_t size; /* size in bytes */ |
diff --git a/arch/mips/include/asm/kvm_host.h b/arch/mips/include/asm/kvm_host.h index 7a3fc67bd7f9..b93bc80ed7e7 100644 --- a/arch/mips/include/asm/kvm_host.h +++ b/arch/mips/include/asm/kvm_host.h | |||
@@ -96,11 +96,6 @@ | |||
96 | #define CAUSEB_DC 27 | 96 | #define CAUSEB_DC 27 |
97 | #define CAUSEF_DC (_ULCAST_(1) << 27) | 97 | #define CAUSEF_DC (_ULCAST_(1) << 27) |
98 | 98 | ||
99 | struct kvm; | ||
100 | struct kvm_run; | ||
101 | struct kvm_vcpu; | ||
102 | struct kvm_interrupt; | ||
103 | |||
104 | extern atomic_t kvm_mips_instance; | 99 | extern atomic_t kvm_mips_instance; |
105 | extern pfn_t(*kvm_mips_gfn_to_pfn) (struct kvm *kvm, gfn_t gfn); | 100 | extern pfn_t(*kvm_mips_gfn_to_pfn) (struct kvm *kvm, gfn_t gfn); |
106 | extern void (*kvm_mips_release_pfn_clean) (pfn_t pfn); | 101 | extern void (*kvm_mips_release_pfn_clean) (pfn_t pfn); |
diff --git a/arch/powerpc/include/asm/kvm_host.h b/arch/powerpc/include/asm/kvm_host.h index 98d9dd50d063..0e597283c5c6 100644 --- a/arch/powerpc/include/asm/kvm_host.h +++ b/arch/powerpc/include/asm/kvm_host.h | |||
@@ -53,7 +53,6 @@ | |||
53 | 53 | ||
54 | #define KVM_ARCH_WANT_MMU_NOTIFIER | 54 | #define KVM_ARCH_WANT_MMU_NOTIFIER |
55 | 55 | ||
56 | struct kvm; | ||
57 | extern int kvm_unmap_hva(struct kvm *kvm, unsigned long hva); | 56 | extern int kvm_unmap_hva(struct kvm *kvm, unsigned long hva); |
58 | extern int kvm_unmap_hva_range(struct kvm *kvm, | 57 | extern int kvm_unmap_hva_range(struct kvm *kvm, |
59 | unsigned long start, unsigned long end); | 58 | unsigned long start, unsigned long end); |
@@ -76,10 +75,6 @@ extern void kvm_set_spte_hva(struct kvm *kvm, unsigned long hva, pte_t pte); | |||
76 | /* Physical Address Mask - allowed range of real mode RAM access */ | 75 | /* Physical Address Mask - allowed range of real mode RAM access */ |
77 | #define KVM_PAM 0x0fffffffffffffffULL | 76 | #define KVM_PAM 0x0fffffffffffffffULL |
78 | 77 | ||
79 | struct kvm; | ||
80 | struct kvm_run; | ||
81 | struct kvm_vcpu; | ||
82 | |||
83 | struct lppaca; | 78 | struct lppaca; |
84 | struct slb_shadow; | 79 | struct slb_shadow; |
85 | struct dtl_entry; | 80 | struct dtl_entry; |
diff --git a/arch/s390/include/asm/kvm_host.h b/arch/s390/include/asm/kvm_host.h index 773bef7614d8..d71291d3fb6f 100644 --- a/arch/s390/include/asm/kvm_host.h +++ b/arch/s390/include/asm/kvm_host.h | |||
@@ -13,8 +13,11 @@ | |||
13 | 13 | ||
14 | #ifndef ASM_KVM_HOST_H | 14 | #ifndef ASM_KVM_HOST_H |
15 | #define ASM_KVM_HOST_H | 15 | #define ASM_KVM_HOST_H |
16 | |||
17 | #include <linux/types.h> | ||
16 | #include <linux/hrtimer.h> | 18 | #include <linux/hrtimer.h> |
17 | #include <linux/interrupt.h> | 19 | #include <linux/interrupt.h> |
20 | #include <linux/kvm_types.h> | ||
18 | #include <linux/kvm_host.h> | 21 | #include <linux/kvm_host.h> |
19 | #include <linux/kvm.h> | 22 | #include <linux/kvm.h> |
20 | #include <asm/debug.h> | 23 | #include <asm/debug.h> |
@@ -431,8 +434,6 @@ static inline bool kvm_is_error_hva(unsigned long addr) | |||
431 | } | 434 | } |
432 | 435 | ||
433 | #define ASYNC_PF_PER_VCPU 64 | 436 | #define ASYNC_PF_PER_VCPU 64 |
434 | struct kvm_vcpu; | ||
435 | struct kvm_async_pf; | ||
436 | struct kvm_arch_async_pf { | 437 | struct kvm_arch_async_pf { |
437 | unsigned long pfault_token; | 438 | unsigned long pfault_token; |
438 | }; | 439 | }; |
diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h index ac0f90e26a0b..567fface45f8 100644 --- a/arch/x86/include/asm/kvm_host.h +++ b/arch/x86/include/asm/kvm_host.h | |||
@@ -99,10 +99,6 @@ static inline gfn_t gfn_to_index(gfn_t gfn, gfn_t base_gfn, int level) | |||
99 | 99 | ||
100 | #define ASYNC_PF_PER_VCPU 64 | 100 | #define ASYNC_PF_PER_VCPU 64 |
101 | 101 | ||
102 | struct kvm_vcpu; | ||
103 | struct kvm; | ||
104 | struct kvm_async_pf; | ||
105 | |||
106 | enum kvm_reg { | 102 | enum kvm_reg { |
107 | VCPU_REGS_RAX = 0, | 103 | VCPU_REGS_RAX = 0, |
108 | VCPU_REGS_RCX = 1, | 104 | VCPU_REGS_RCX = 1, |
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index ebd723676633..e1cb915a1096 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h | |||
@@ -140,8 +140,6 @@ static inline bool is_error_page(struct page *page) | |||
140 | #define KVM_USERSPACE_IRQ_SOURCE_ID 0 | 140 | #define KVM_USERSPACE_IRQ_SOURCE_ID 0 |
141 | #define KVM_IRQFD_RESAMPLE_IRQ_SOURCE_ID 1 | 141 | #define KVM_IRQFD_RESAMPLE_IRQ_SOURCE_ID 1 |
142 | 142 | ||
143 | struct kvm; | ||
144 | struct kvm_vcpu; | ||
145 | extern struct kmem_cache *kvm_vcpu_cache; | 143 | extern struct kmem_cache *kvm_vcpu_cache; |
146 | 144 | ||
147 | extern spinlock_t kvm_lock; | 145 | extern spinlock_t kvm_lock; |
@@ -325,8 +323,6 @@ struct kvm_kernel_irq_routing_entry { | |||
325 | struct hlist_node link; | 323 | struct hlist_node link; |
326 | }; | 324 | }; |
327 | 325 | ||
328 | struct kvm_irq_routing_table; | ||
329 | |||
330 | #ifndef KVM_PRIVATE_MEM_SLOTS | 326 | #ifndef KVM_PRIVATE_MEM_SLOTS |
331 | #define KVM_PRIVATE_MEM_SLOTS 0 | 327 | #define KVM_PRIVATE_MEM_SLOTS 0 |
332 | #endif | 328 | #endif |
@@ -1036,8 +1032,6 @@ static inline bool kvm_check_request(int req, struct kvm_vcpu *vcpu) | |||
1036 | 1032 | ||
1037 | extern bool kvm_rebooting; | 1033 | extern bool kvm_rebooting; |
1038 | 1034 | ||
1039 | struct kvm_device_ops; | ||
1040 | |||
1041 | struct kvm_device { | 1035 | struct kvm_device { |
1042 | struct kvm_device_ops *ops; | 1036 | struct kvm_device_ops *ops; |
1043 | struct kvm *kvm; | 1037 | struct kvm *kvm; |
diff --git a/include/linux/kvm_types.h b/include/linux/kvm_types.h index b0bcce0ddc95..b606bb689a3e 100644 --- a/include/linux/kvm_types.h +++ b/include/linux/kvm_types.h | |||
@@ -17,6 +17,20 @@ | |||
17 | #ifndef __KVM_TYPES_H__ | 17 | #ifndef __KVM_TYPES_H__ |
18 | #define __KVM_TYPES_H__ | 18 | #define __KVM_TYPES_H__ |
19 | 19 | ||
20 | struct kvm; | ||
21 | struct kvm_async_pf; | ||
22 | struct kvm_device_ops; | ||
23 | struct kvm_interrupt; | ||
24 | struct kvm_irq_routing_table; | ||
25 | struct kvm_memory_slot; | ||
26 | struct kvm_one_reg; | ||
27 | struct kvm_run; | ||
28 | struct kvm_userspace_memory_region; | ||
29 | struct kvm_vcpu; | ||
30 | struct kvm_vcpu_init; | ||
31 | |||
32 | enum kvm_mr_change; | ||
33 | |||
20 | #include <asm/types.h> | 34 | #include <asm/types.h> |
21 | 35 | ||
22 | /* | 36 | /* |