aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm64/include/asm/kvm_host.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm64/include/asm/kvm_host.h')
-rw-r--r--arch/arm64/include/asm/kvm_host.h27
1 files changed, 18 insertions, 9 deletions
diff --git a/arch/arm64/include/asm/kvm_host.h b/arch/arm64/include/asm/kvm_host.h
index e10c45a578e3..0b7dfdb931df 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,8 +43,7 @@
41 43
42#define KVM_VCPU_MAX_FEATURES 3 44#define KVM_VCPU_MAX_FEATURES 3
43 45
44struct kvm_vcpu; 46int __attribute_const__ kvm_target_cpu(void);
45int 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);
48 49
@@ -164,25 +165,21 @@ 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,
169 const struct kvm_vcpu_init *init);
170int kvm_vcpu_preferred_target(struct kvm_vcpu_init *init); 168int kvm_vcpu_preferred_target(struct kvm_vcpu_init *init);
171unsigned long kvm_arm_num_regs(struct kvm_vcpu *vcpu); 169unsigned long kvm_arm_num_regs(struct kvm_vcpu *vcpu);
172int kvm_arm_copy_reg_indices(struct kvm_vcpu *vcpu, u64 __user *indices); 170int 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); 171int 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); 172int kvm_arm_set_reg(struct kvm_vcpu *vcpu, const struct kvm_one_reg *reg);
176 173
177#define KVM_ARCH_WANT_MMU_NOTIFIER 174#define KVM_ARCH_WANT_MMU_NOTIFIER
178struct kvm;
179int kvm_unmap_hva(struct kvm *kvm, unsigned long hva); 175int kvm_unmap_hva(struct kvm *kvm, unsigned long hva);
180int kvm_unmap_hva_range(struct kvm *kvm, 176int kvm_unmap_hva_range(struct kvm *kvm,
181 unsigned long start, unsigned long end); 177 unsigned long start, unsigned long end);
182void kvm_set_spte_hva(struct kvm *kvm, unsigned long hva, pte_t pte); 178void kvm_set_spte_hva(struct kvm *kvm, unsigned long hva, pte_t pte);
183 179
184/* We do not have shadow page tables, hence the empty hooks */ 180/* We do not have shadow page tables, hence the empty hooks */
185static inline int kvm_age_hva(struct kvm *kvm, unsigned long hva) 181static inline int kvm_age_hva(struct kvm *kvm, unsigned long start,
182 unsigned long end)
186{ 183{
187 return 0; 184 return 0;
188} 185}
@@ -192,10 +189,16 @@ static inline int kvm_test_age_hva(struct kvm *kvm, unsigned long hva)
192 return 0; 189 return 0;
193} 190}
194 191
192static inline void kvm_arch_mmu_notifier_invalidate_page(struct kvm *kvm,
193 unsigned long address)
194{
195}
196
195struct kvm_vcpu *kvm_arm_get_running_vcpu(void); 197struct kvm_vcpu *kvm_arm_get_running_vcpu(void);
196struct kvm_vcpu __percpu **kvm_get_running_vcpus(void); 198struct kvm_vcpu * __percpu *kvm_get_running_vcpus(void);
197 199
198u64 kvm_call_hyp(void *hypfn, ...); 200u64 kvm_call_hyp(void *hypfn, ...);
201void force_vm_exit(const cpumask_t *mask);
199 202
200int handle_exit(struct kvm_vcpu *vcpu, struct kvm_run *run, 203int handle_exit(struct kvm_vcpu *vcpu, struct kvm_run *run,
201 int exception_index); 204 int exception_index);
@@ -244,4 +247,10 @@ static inline void vgic_arch_setup(const struct vgic_params *vgic)
244 } 247 }
245} 248}
246 249
250static inline void kvm_arch_hardware_disable(void) {}
251static inline void kvm_arch_hardware_unsetup(void) {}
252static inline void kvm_arch_sync_events(struct kvm *kvm) {}
253static inline void kvm_arch_vcpu_uninit(struct kvm_vcpu *vcpu) {}
254static inline void kvm_arch_sched_in(struct kvm_vcpu *vcpu, int cpu) {}
255
247#endif /* __ARM64_KVM_HOST_H__ */ 256#endif /* __ARM64_KVM_HOST_H__ */