diff options
Diffstat (limited to 'arch/arm/include/asm/kvm_host.h')
-rw-r--r-- | arch/arm/include/asm/kvm_host.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/arch/arm/include/asm/kvm_host.h b/arch/arm/include/asm/kvm_host.h index 98b4d1a72923..dfe98866a992 100644 --- a/arch/arm/include/asm/kvm_host.h +++ b/arch/arm/include/asm/kvm_host.h | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <asm/kvm_asm.h> | 23 | #include <asm/kvm_asm.h> |
24 | #include <asm/kvm_mmio.h> | 24 | #include <asm/kvm_mmio.h> |
25 | #include <asm/fpstate.h> | 25 | #include <asm/fpstate.h> |
26 | #include <asm/kvm_arch_timer.h> | ||
26 | 27 | ||
27 | #define KVM_MAX_VCPUS CONFIG_KVM_ARM_MAX_VCPUS | 28 | #define KVM_MAX_VCPUS CONFIG_KVM_ARM_MAX_VCPUS |
28 | #define KVM_MEMORY_SLOTS 32 | 29 | #define KVM_MEMORY_SLOTS 32 |
@@ -37,6 +38,8 @@ | |||
37 | #define KVM_NR_PAGE_SIZES 1 | 38 | #define KVM_NR_PAGE_SIZES 1 |
38 | #define KVM_PAGES_PER_HPAGE(x) (1UL<<31) | 39 | #define KVM_PAGES_PER_HPAGE(x) (1UL<<31) |
39 | 40 | ||
41 | #include <asm/kvm_vgic.h> | ||
42 | |||
40 | struct kvm_vcpu; | 43 | struct kvm_vcpu; |
41 | u32 *kvm_vcpu_reg(struct kvm_vcpu *vcpu, u8 reg_num, u32 mode); | 44 | u32 *kvm_vcpu_reg(struct kvm_vcpu *vcpu, u8 reg_num, u32 mode); |
42 | int kvm_target_cpu(void); | 45 | int kvm_target_cpu(void); |
@@ -47,6 +50,9 @@ struct kvm_arch { | |||
47 | /* VTTBR value associated with below pgd and vmid */ | 50 | /* VTTBR value associated with below pgd and vmid */ |
48 | u64 vttbr; | 51 | u64 vttbr; |
49 | 52 | ||
53 | /* Timer */ | ||
54 | struct arch_timer_kvm timer; | ||
55 | |||
50 | /* | 56 | /* |
51 | * Anything that is not used directly from assembly code goes | 57 | * Anything that is not used directly from assembly code goes |
52 | * here. | 58 | * here. |
@@ -58,6 +64,9 @@ struct kvm_arch { | |||
58 | 64 | ||
59 | /* Stage-2 page table */ | 65 | /* Stage-2 page table */ |
60 | pgd_t *pgd; | 66 | pgd_t *pgd; |
67 | |||
68 | /* Interrupt controller */ | ||
69 | struct vgic_dist vgic; | ||
61 | }; | 70 | }; |
62 | 71 | ||
63 | #define KVM_NR_MEM_OBJS 40 | 72 | #define KVM_NR_MEM_OBJS 40 |
@@ -92,6 +101,10 @@ struct kvm_vcpu_arch { | |||
92 | struct vfp_hard_struct vfp_guest; | 101 | struct vfp_hard_struct vfp_guest; |
93 | struct vfp_hard_struct *vfp_host; | 102 | struct vfp_hard_struct *vfp_host; |
94 | 103 | ||
104 | /* VGIC state */ | ||
105 | struct vgic_cpu vgic_cpu; | ||
106 | struct arch_timer_cpu timer_cpu; | ||
107 | |||
95 | /* | 108 | /* |
96 | * Anything that is not used directly from assembly code goes | 109 | * Anything that is not used directly from assembly code goes |
97 | * here. | 110 | * here. |
@@ -158,4 +171,14 @@ static inline int kvm_test_age_hva(struct kvm *kvm, unsigned long hva) | |||
158 | { | 171 | { |
159 | return 0; | 172 | return 0; |
160 | } | 173 | } |
174 | |||
175 | struct kvm_vcpu *kvm_arm_get_running_vcpu(void); | ||
176 | struct kvm_vcpu __percpu **kvm_get_running_vcpus(void); | ||
177 | |||
178 | int kvm_arm_copy_coproc_indices(struct kvm_vcpu *vcpu, u64 __user *uindices); | ||
179 | unsigned long kvm_arm_num_coproc_regs(struct kvm_vcpu *vcpu); | ||
180 | struct kvm_one_reg; | ||
181 | int kvm_arm_coproc_get_reg(struct kvm_vcpu *vcpu, const struct kvm_one_reg *); | ||
182 | int kvm_arm_coproc_set_reg(struct kvm_vcpu *vcpu, const struct kvm_one_reg *); | ||
183 | |||
161 | #endif /* __ARM_KVM_HOST_H__ */ | 184 | #endif /* __ARM_KVM_HOST_H__ */ |