diff options
Diffstat (limited to 'arch/arm64/include/asm/kvm_host.h')
| -rw-r--r-- | arch/arm64/include/asm/kvm_host.h | 27 |
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 | ||
| 44 | struct kvm_vcpu; | 46 | int __attribute_const__ kvm_target_cpu(void); |
| 45 | 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); |
| 48 | 49 | ||
| @@ -164,25 +165,21 @@ 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, | ||
| 169 | const struct kvm_vcpu_init *init); | ||
| 170 | int kvm_vcpu_preferred_target(struct kvm_vcpu_init *init); | 168 | int kvm_vcpu_preferred_target(struct kvm_vcpu_init *init); |
| 171 | unsigned long kvm_arm_num_regs(struct kvm_vcpu *vcpu); | 169 | unsigned long kvm_arm_num_regs(struct kvm_vcpu *vcpu); |
| 172 | int kvm_arm_copy_reg_indices(struct kvm_vcpu *vcpu, u64 __user *indices); | 170 | 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); | 171 | 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); | 172 | int 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 |
| 178 | struct kvm; | ||
| 179 | int kvm_unmap_hva(struct kvm *kvm, unsigned long hva); | 175 | int kvm_unmap_hva(struct kvm *kvm, unsigned long hva); |
| 180 | int kvm_unmap_hva_range(struct kvm *kvm, | 176 | int kvm_unmap_hva_range(struct kvm *kvm, |
| 181 | unsigned long start, unsigned long end); | 177 | unsigned long start, unsigned long end); |
| 182 | void kvm_set_spte_hva(struct kvm *kvm, unsigned long hva, pte_t pte); | 178 | void 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 */ |
| 185 | static inline int kvm_age_hva(struct kvm *kvm, unsigned long hva) | 181 | static 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 | ||
| 192 | static inline void kvm_arch_mmu_notifier_invalidate_page(struct kvm *kvm, | ||
| 193 | unsigned long address) | ||
| 194 | { | ||
| 195 | } | ||
| 196 | |||
| 195 | struct kvm_vcpu *kvm_arm_get_running_vcpu(void); | 197 | struct kvm_vcpu *kvm_arm_get_running_vcpu(void); |
| 196 | struct kvm_vcpu __percpu **kvm_get_running_vcpus(void); | 198 | struct kvm_vcpu * __percpu *kvm_get_running_vcpus(void); |
| 197 | 199 | ||
| 198 | u64 kvm_call_hyp(void *hypfn, ...); | 200 | u64 kvm_call_hyp(void *hypfn, ...); |
| 201 | void force_vm_exit(const cpumask_t *mask); | ||
| 199 | 202 | ||
| 200 | int handle_exit(struct kvm_vcpu *vcpu, struct kvm_run *run, | 203 | int 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 | ||
| 250 | static inline void kvm_arch_hardware_disable(void) {} | ||
| 251 | static inline void kvm_arch_hardware_unsetup(void) {} | ||
| 252 | static inline void kvm_arch_sync_events(struct kvm *kvm) {} | ||
| 253 | static inline void kvm_arch_vcpu_uninit(struct kvm_vcpu *vcpu) {} | ||
| 254 | static 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__ */ |
