diff options
Diffstat (limited to 'arch/powerpc/include/asm/kvm_ppc.h')
-rw-r--r-- | arch/powerpc/include/asm/kvm_ppc.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/kvm_ppc.h b/arch/powerpc/include/asm/kvm_ppc.h index 9345238edecf..d121f49d62b8 100644 --- a/arch/powerpc/include/asm/kvm_ppc.h +++ b/arch/powerpc/include/asm/kvm_ppc.h | |||
@@ -33,6 +33,9 @@ | |||
33 | #else | 33 | #else |
34 | #include <asm/kvm_booke.h> | 34 | #include <asm/kvm_booke.h> |
35 | #endif | 35 | #endif |
36 | #ifdef CONFIG_KVM_BOOK3S_64_HANDLER | ||
37 | #include <asm/paca.h> | ||
38 | #endif | ||
36 | 39 | ||
37 | enum emulation_result { | 40 | enum emulation_result { |
38 | EMULATE_DONE, /* no further processing */ | 41 | EMULATE_DONE, /* no further processing */ |
@@ -42,6 +45,7 @@ enum emulation_result { | |||
42 | EMULATE_AGAIN, /* something went wrong. go again */ | 45 | EMULATE_AGAIN, /* something went wrong. go again */ |
43 | }; | 46 | }; |
44 | 47 | ||
48 | extern int kvmppc_vcpu_run(struct kvm_run *kvm_run, struct kvm_vcpu *vcpu); | ||
45 | extern int __kvmppc_vcpu_run(struct kvm_run *kvm_run, struct kvm_vcpu *vcpu); | 49 | extern int __kvmppc_vcpu_run(struct kvm_run *kvm_run, struct kvm_vcpu *vcpu); |
46 | extern char kvmppc_handlers_start[]; | 50 | extern char kvmppc_handlers_start[]; |
47 | extern unsigned long kvmppc_handler_len; | 51 | extern unsigned long kvmppc_handler_len; |
@@ -109,6 +113,27 @@ extern void kvmppc_booke_exit(void); | |||
109 | 113 | ||
110 | extern void kvmppc_core_destroy_mmu(struct kvm_vcpu *vcpu); | 114 | extern void kvmppc_core_destroy_mmu(struct kvm_vcpu *vcpu); |
111 | extern int kvmppc_kvm_pv(struct kvm_vcpu *vcpu); | 115 | extern int kvmppc_kvm_pv(struct kvm_vcpu *vcpu); |
116 | extern void kvmppc_map_magic(struct kvm_vcpu *vcpu); | ||
117 | |||
118 | extern long kvmppc_alloc_hpt(struct kvm *kvm); | ||
119 | extern void kvmppc_free_hpt(struct kvm *kvm); | ||
120 | extern long kvmppc_prepare_vrma(struct kvm *kvm, | ||
121 | struct kvm_userspace_memory_region *mem); | ||
122 | extern void kvmppc_map_vrma(struct kvm *kvm, | ||
123 | struct kvm_userspace_memory_region *mem); | ||
124 | extern int kvmppc_pseries_do_hcall(struct kvm_vcpu *vcpu); | ||
125 | extern long kvm_vm_ioctl_create_spapr_tce(struct kvm *kvm, | ||
126 | struct kvm_create_spapr_tce *args); | ||
127 | extern long kvm_vm_ioctl_allocate_rma(struct kvm *kvm, | ||
128 | struct kvm_allocate_rma *rma); | ||
129 | extern struct kvmppc_rma_info *kvm_alloc_rma(void); | ||
130 | extern void kvm_release_rma(struct kvmppc_rma_info *ri); | ||
131 | extern int kvmppc_core_init_vm(struct kvm *kvm); | ||
132 | extern void kvmppc_core_destroy_vm(struct kvm *kvm); | ||
133 | extern int kvmppc_core_prepare_memory_region(struct kvm *kvm, | ||
134 | struct kvm_userspace_memory_region *mem); | ||
135 | extern void kvmppc_core_commit_memory_region(struct kvm *kvm, | ||
136 | struct kvm_userspace_memory_region *mem); | ||
112 | 137 | ||
113 | /* | 138 | /* |
114 | * Cuts out inst bits with ordering according to spec. | 139 | * Cuts out inst bits with ordering according to spec. |
@@ -151,4 +176,20 @@ int kvmppc_set_sregs_ivor(struct kvm_vcpu *vcpu, struct kvm_sregs *sregs); | |||
151 | 176 | ||
152 | void kvmppc_set_pid(struct kvm_vcpu *vcpu, u32 pid); | 177 | void kvmppc_set_pid(struct kvm_vcpu *vcpu, u32 pid); |
153 | 178 | ||
179 | #ifdef CONFIG_KVM_BOOK3S_64_HV | ||
180 | static inline void kvmppc_set_xics_phys(int cpu, unsigned long addr) | ||
181 | { | ||
182 | paca[cpu].kvm_hstate.xics_phys = addr; | ||
183 | } | ||
184 | |||
185 | extern void kvm_rma_init(void); | ||
186 | |||
187 | #else | ||
188 | static inline void kvmppc_set_xics_phys(int cpu, unsigned long addr) | ||
189 | {} | ||
190 | |||
191 | static inline void kvm_rma_init(void) | ||
192 | {} | ||
193 | #endif | ||
194 | |||
154 | #endif /* __POWERPC_KVM_PPC_H__ */ | 195 | #endif /* __POWERPC_KVM_PPC_H__ */ |