diff options
Diffstat (limited to 'arch/arm/include')
-rw-r--r-- | arch/arm/include/asm/kvm_arm.h | 11 | ||||
-rw-r--r-- | arch/arm/include/asm/kvm_coproc.h | 14 | ||||
-rw-r--r-- | arch/arm/include/asm/kvm_emulate.h | 6 | ||||
-rw-r--r-- | arch/arm/include/asm/kvm_host.h | 4 |
4 files changed, 35 insertions, 0 deletions
diff --git a/arch/arm/include/asm/kvm_arm.h b/arch/arm/include/asm/kvm_arm.h index c69936b1fc53..9a34c20d41ec 100644 --- a/arch/arm/include/asm/kvm_arm.h +++ b/arch/arm/include/asm/kvm_arm.h | |||
@@ -70,6 +70,11 @@ | |||
70 | HCR_SWIO | HCR_TIDCP) | 70 | HCR_SWIO | HCR_TIDCP) |
71 | #define HCR_VIRT_EXCP_MASK (HCR_VA | HCR_VI | HCR_VF) | 71 | #define HCR_VIRT_EXCP_MASK (HCR_VA | HCR_VI | HCR_VF) |
72 | 72 | ||
73 | /* System Control Register (SCTLR) bits */ | ||
74 | #define SCTLR_TE (1 << 30) | ||
75 | #define SCTLR_EE (1 << 25) | ||
76 | #define SCTLR_V (1 << 13) | ||
77 | |||
73 | /* Hyp System Control Register (HSCTLR) bits */ | 78 | /* Hyp System Control Register (HSCTLR) bits */ |
74 | #define HSCTLR_TE (1 << 30) | 79 | #define HSCTLR_TE (1 << 30) |
75 | #define HSCTLR_EE (1 << 25) | 80 | #define HSCTLR_EE (1 << 25) |
@@ -171,6 +176,10 @@ | |||
171 | #define HSR_FSC (0x3f) | 176 | #define HSR_FSC (0x3f) |
172 | #define HSR_FSC_TYPE (0x3c) | 177 | #define HSR_FSC_TYPE (0x3c) |
173 | #define HSR_WNR (1 << 6) | 178 | #define HSR_WNR (1 << 6) |
179 | #define HSR_CV_SHIFT (24) | ||
180 | #define HSR_CV (1U << HSR_CV_SHIFT) | ||
181 | #define HSR_COND_SHIFT (20) | ||
182 | #define HSR_COND (0xfU << HSR_COND_SHIFT) | ||
174 | 183 | ||
175 | #define FSC_FAULT (0x04) | 184 | #define FSC_FAULT (0x04) |
176 | #define FSC_PERM (0x0c) | 185 | #define FSC_PERM (0x0c) |
@@ -197,4 +206,6 @@ | |||
197 | #define HSR_EC_DABT (0x24) | 206 | #define HSR_EC_DABT (0x24) |
198 | #define HSR_EC_DABT_HYP (0x25) | 207 | #define HSR_EC_DABT_HYP (0x25) |
199 | 208 | ||
209 | #define HSR_HVC_IMM_MASK ((1UL << 16) - 1) | ||
210 | |||
200 | #endif /* __ARM_KVM_ARM_H__ */ | 211 | #endif /* __ARM_KVM_ARM_H__ */ |
diff --git a/arch/arm/include/asm/kvm_coproc.h b/arch/arm/include/asm/kvm_coproc.h index b6d023deb426..bd1ace030495 100644 --- a/arch/arm/include/asm/kvm_coproc.h +++ b/arch/arm/include/asm/kvm_coproc.h | |||
@@ -21,4 +21,18 @@ | |||
21 | 21 | ||
22 | void kvm_reset_coprocs(struct kvm_vcpu *vcpu); | 22 | void kvm_reset_coprocs(struct kvm_vcpu *vcpu); |
23 | 23 | ||
24 | struct kvm_coproc_target_table { | ||
25 | unsigned target; | ||
26 | const struct coproc_reg *table; | ||
27 | size_t num; | ||
28 | }; | ||
29 | void kvm_register_target_coproc_table(struct kvm_coproc_target_table *table); | ||
30 | |||
31 | int kvm_handle_cp10_id(struct kvm_vcpu *vcpu, struct kvm_run *run); | ||
32 | int kvm_handle_cp_0_13_access(struct kvm_vcpu *vcpu, struct kvm_run *run); | ||
33 | int kvm_handle_cp14_load_store(struct kvm_vcpu *vcpu, struct kvm_run *run); | ||
34 | int kvm_handle_cp14_access(struct kvm_vcpu *vcpu, struct kvm_run *run); | ||
35 | int kvm_handle_cp15_32(struct kvm_vcpu *vcpu, struct kvm_run *run); | ||
36 | int kvm_handle_cp15_64(struct kvm_vcpu *vcpu, struct kvm_run *run); | ||
37 | void kvm_coproc_table_init(void); | ||
24 | #endif /* __ARM_KVM_COPROC_H__ */ | 38 | #endif /* __ARM_KVM_COPROC_H__ */ |
diff --git a/arch/arm/include/asm/kvm_emulate.h b/arch/arm/include/asm/kvm_emulate.h index 17dad674b90f..01a755b80632 100644 --- a/arch/arm/include/asm/kvm_emulate.h +++ b/arch/arm/include/asm/kvm_emulate.h | |||
@@ -25,6 +25,12 @@ | |||
25 | u32 *vcpu_reg(struct kvm_vcpu *vcpu, u8 reg_num); | 25 | u32 *vcpu_reg(struct kvm_vcpu *vcpu, u8 reg_num); |
26 | u32 *vcpu_spsr(struct kvm_vcpu *vcpu); | 26 | u32 *vcpu_spsr(struct kvm_vcpu *vcpu); |
27 | 27 | ||
28 | int kvm_handle_wfi(struct kvm_vcpu *vcpu, struct kvm_run *run); | ||
29 | void kvm_skip_instr(struct kvm_vcpu *vcpu, bool is_wide_instr); | ||
30 | void kvm_inject_undefined(struct kvm_vcpu *vcpu); | ||
31 | void kvm_inject_dabt(struct kvm_vcpu *vcpu, unsigned long addr); | ||
32 | void kvm_inject_pabt(struct kvm_vcpu *vcpu, unsigned long addr); | ||
33 | |||
28 | static inline u32 *vcpu_pc(struct kvm_vcpu *vcpu) | 34 | static inline u32 *vcpu_pc(struct kvm_vcpu *vcpu) |
29 | { | 35 | { |
30 | return (u32 *)&vcpu->arch.regs.usr_regs.ARM_pc; | 36 | return (u32 *)&vcpu->arch.regs.usr_regs.ARM_pc; |
diff --git a/arch/arm/include/asm/kvm_host.h b/arch/arm/include/asm/kvm_host.h index 7a121089c733..e1d4168d4f19 100644 --- a/arch/arm/include/asm/kvm_host.h +++ b/arch/arm/include/asm/kvm_host.h | |||
@@ -94,6 +94,10 @@ struct kvm_vcpu_arch { | |||
94 | * Anything that is not used directly from assembly code goes | 94 | * Anything that is not used directly from assembly code goes |
95 | * here. | 95 | * here. |
96 | */ | 96 | */ |
97 | /* dcache set/way operation pending */ | ||
98 | int last_pcpu; | ||
99 | cpumask_t require_dcache_flush; | ||
100 | |||
97 | /* Interrupt related fields */ | 101 | /* Interrupt related fields */ |
98 | u32 irq_lines; /* IRQ and FIQ levels */ | 102 | u32 irq_lines; /* IRQ and FIQ levels */ |
99 | 103 | ||