aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/include/asm/kvm_host.h7
-rw-r--r--arch/arm64/include/asm/kvm_host.h6
-rw-r--r--arch/ia64/include/asm/kvm_host.h3
-rw-r--r--arch/mips/include/asm/kvm_host.h5
-rw-r--r--arch/powerpc/include/asm/kvm_host.h5
-rw-r--r--arch/s390/include/asm/kvm_host.h5
-rw-r--r--arch/x86/include/asm/kvm_host.h4
-rw-r--r--include/linux/kvm_host.h6
-rw-r--r--include/linux/kvm_types.h14
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
43struct kvm_vcpu;
44u32 *kvm_vcpu_reg(struct kvm_vcpu *vcpu, u8 reg_num, u32 mode); 45u32 *kvm_vcpu_reg(struct kvm_vcpu *vcpu, u8 reg_num, u32 mode);
45int kvm_target_cpu(void); 46int kvm_target_cpu(void);
46int kvm_reset_vcpu(struct kvm_vcpu *vcpu); 47int 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
152struct kvm_vcpu_init;
153int kvm_vcpu_set_target(struct kvm_vcpu *vcpu, 153int kvm_vcpu_set_target(struct kvm_vcpu *vcpu,
154 const struct kvm_vcpu_init *init); 154 const struct kvm_vcpu_init *init);
155int kvm_vcpu_preferred_target(struct kvm_vcpu_init *init); 155int kvm_vcpu_preferred_target(struct kvm_vcpu_init *init);
156unsigned long kvm_arm_num_regs(struct kvm_vcpu *vcpu); 156unsigned long kvm_arm_num_regs(struct kvm_vcpu *vcpu);
157int kvm_arm_copy_reg_indices(struct kvm_vcpu *vcpu, u64 __user *indices); 157int kvm_arm_copy_reg_indices(struct kvm_vcpu *vcpu, u64 __user *indices);
158struct kvm_one_reg;
159int kvm_arm_get_reg(struct kvm_vcpu *vcpu, const struct kvm_one_reg *reg); 158int kvm_arm_get_reg(struct kvm_vcpu *vcpu, const struct kvm_one_reg *reg);
160int kvm_arm_set_reg(struct kvm_vcpu *vcpu, const struct kvm_one_reg *reg); 159int kvm_arm_set_reg(struct kvm_vcpu *vcpu, const struct kvm_one_reg *reg);
161u64 kvm_call_hyp(void *hypfn, ...); 160u64 kvm_call_hyp(void *hypfn, ...);
162void force_vm_exit(const cpumask_t *mask); 161void force_vm_exit(const cpumask_t *mask);
163 162
164#define KVM_ARCH_WANT_MMU_NOTIFIER 163#define KVM_ARCH_WANT_MMU_NOTIFIER
165struct kvm;
166int kvm_unmap_hva(struct kvm *kvm, unsigned long hva); 164int kvm_unmap_hva(struct kvm *kvm, unsigned long hva);
167int kvm_unmap_hva_range(struct kvm *kvm, 165int 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
188int kvm_arm_copy_coproc_indices(struct kvm_vcpu *vcpu, u64 __user *uindices); 186int kvm_arm_copy_coproc_indices(struct kvm_vcpu *vcpu, u64 __user *uindices);
189unsigned long kvm_arm_num_coproc_regs(struct kvm_vcpu *vcpu); 187unsigned long kvm_arm_num_coproc_regs(struct kvm_vcpu *vcpu);
190struct kvm_one_reg;
191int kvm_arm_coproc_get_reg(struct kvm_vcpu *vcpu, const struct kvm_one_reg *); 188int kvm_arm_coproc_get_reg(struct kvm_vcpu *vcpu, const struct kvm_one_reg *);
192int kvm_arm_coproc_set_reg(struct kvm_vcpu *vcpu, const struct kvm_one_reg *); 189int 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
44struct kvm_vcpu;
45int kvm_target_cpu(void); 46int kvm_target_cpu(void);
46int kvm_reset_vcpu(struct kvm_vcpu *vcpu); 47int kvm_reset_vcpu(struct kvm_vcpu *vcpu);
47int kvm_arch_dev_ioctl_check_extension(long ext); 48int 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
167struct kvm_vcpu_init;
168int kvm_vcpu_set_target(struct kvm_vcpu *vcpu, 168int kvm_vcpu_set_target(struct kvm_vcpu *vcpu,
169 const struct kvm_vcpu_init *init); 169 const struct kvm_vcpu_init *init);
170int kvm_vcpu_preferred_target(struct kvm_vcpu_init *init); 170int kvm_vcpu_preferred_target(struct kvm_vcpu_init *init);
171unsigned long kvm_arm_num_regs(struct kvm_vcpu *vcpu); 171unsigned long kvm_arm_num_regs(struct kvm_vcpu *vcpu);
172int kvm_arm_copy_reg_indices(struct kvm_vcpu *vcpu, u64 __user *indices); 172int kvm_arm_copy_reg_indices(struct kvm_vcpu *vcpu, u64 __user *indices);
173struct kvm_one_reg;
174int kvm_arm_get_reg(struct kvm_vcpu *vcpu, const struct kvm_one_reg *reg); 173int kvm_arm_get_reg(struct kvm_vcpu *vcpu, const struct kvm_one_reg *reg);
175int kvm_arm_set_reg(struct kvm_vcpu *vcpu, const struct kvm_one_reg *reg); 174int 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
178struct kvm;
179int kvm_unmap_hva(struct kvm *kvm, unsigned long hva); 177int kvm_unmap_hva(struct kvm *kvm, unsigned long hva);
180int kvm_unmap_hva_range(struct kvm *kvm, 178int 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
237struct kvm;
238struct kvm_vcpu;
239
240struct kvm_mmio_req { 237struct 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
99struct kvm;
100struct kvm_run;
101struct kvm_vcpu;
102struct kvm_interrupt;
103
104extern atomic_t kvm_mips_instance; 99extern atomic_t kvm_mips_instance;
105extern pfn_t(*kvm_mips_gfn_to_pfn) (struct kvm *kvm, gfn_t gfn); 100extern pfn_t(*kvm_mips_gfn_to_pfn) (struct kvm *kvm, gfn_t gfn);
106extern void (*kvm_mips_release_pfn_clean) (pfn_t pfn); 101extern 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
56struct kvm;
57extern int kvm_unmap_hva(struct kvm *kvm, unsigned long hva); 56extern int kvm_unmap_hva(struct kvm *kvm, unsigned long hva);
58extern int kvm_unmap_hva_range(struct kvm *kvm, 57extern 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
79struct kvm;
80struct kvm_run;
81struct kvm_vcpu;
82
83struct lppaca; 78struct lppaca;
84struct slb_shadow; 79struct slb_shadow;
85struct dtl_entry; 80struct 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
434struct kvm_vcpu;
435struct kvm_async_pf;
436struct kvm_arch_async_pf { 437struct 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
102struct kvm_vcpu;
103struct kvm;
104struct kvm_async_pf;
105
106enum kvm_reg { 102enum 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
143struct kvm;
144struct kvm_vcpu;
145extern struct kmem_cache *kvm_vcpu_cache; 143extern struct kmem_cache *kvm_vcpu_cache;
146 144
147extern spinlock_t kvm_lock; 145extern 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
328struct 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
1037extern bool kvm_rebooting; 1033extern bool kvm_rebooting;
1038 1034
1039struct kvm_device_ops;
1040
1041struct kvm_device { 1035struct 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
20struct kvm;
21struct kvm_async_pf;
22struct kvm_device_ops;
23struct kvm_interrupt;
24struct kvm_irq_routing_table;
25struct kvm_memory_slot;
26struct kvm_one_reg;
27struct kvm_run;
28struct kvm_userspace_memory_region;
29struct kvm_vcpu;
30struct kvm_vcpu_init;
31
32enum kvm_mr_change;
33
20#include <asm/types.h> 34#include <asm/types.h>
21 35
22/* 36/*