diff options
Diffstat (limited to 'arch/arm64/include')
-rw-r--r-- | arch/arm64/include/asm/kvm_arm.h | 6 | ||||
-rw-r--r-- | arch/arm64/include/asm/kvm_asm.h | 2 | ||||
-rw-r--r-- | arch/arm64/include/asm/kvm_host.h | 7 |
3 files changed, 7 insertions, 8 deletions
diff --git a/arch/arm64/include/asm/kvm_arm.h b/arch/arm64/include/asm/kvm_arm.h index 4150fd8bae01..3f29887995bc 100644 --- a/arch/arm64/include/asm/kvm_arm.h +++ b/arch/arm64/include/asm/kvm_arm.h | |||
@@ -151,8 +151,7 @@ | |||
151 | */ | 151 | */ |
152 | #define VTCR_EL2_FLAGS (VTCR_EL2_TG0_64K | VTCR_EL2_SH0_INNER | \ | 152 | #define VTCR_EL2_FLAGS (VTCR_EL2_TG0_64K | VTCR_EL2_SH0_INNER | \ |
153 | VTCR_EL2_ORGN0_WBWA | VTCR_EL2_IRGN0_WBWA | \ | 153 | VTCR_EL2_ORGN0_WBWA | VTCR_EL2_IRGN0_WBWA | \ |
154 | VTCR_EL2_SL0_LVL1 | VTCR_EL2_T0SZ_40B | \ | 154 | VTCR_EL2_SL0_LVL1 | VTCR_EL2_RES1) |
155 | VTCR_EL2_RES1) | ||
156 | #define VTTBR_X (38 - VTCR_EL2_T0SZ_40B) | 155 | #define VTTBR_X (38 - VTCR_EL2_T0SZ_40B) |
157 | #else | 156 | #else |
158 | /* | 157 | /* |
@@ -163,8 +162,7 @@ | |||
163 | */ | 162 | */ |
164 | #define VTCR_EL2_FLAGS (VTCR_EL2_TG0_4K | VTCR_EL2_SH0_INNER | \ | 163 | #define VTCR_EL2_FLAGS (VTCR_EL2_TG0_4K | VTCR_EL2_SH0_INNER | \ |
165 | VTCR_EL2_ORGN0_WBWA | VTCR_EL2_IRGN0_WBWA | \ | 164 | VTCR_EL2_ORGN0_WBWA | VTCR_EL2_IRGN0_WBWA | \ |
166 | VTCR_EL2_SL0_LVL1 | VTCR_EL2_T0SZ_40B | \ | 165 | VTCR_EL2_SL0_LVL1 | VTCR_EL2_RES1) |
167 | VTCR_EL2_RES1) | ||
168 | #define VTTBR_X (37 - VTCR_EL2_T0SZ_40B) | 166 | #define VTTBR_X (37 - VTCR_EL2_T0SZ_40B) |
169 | #endif | 167 | #endif |
170 | 168 | ||
diff --git a/arch/arm64/include/asm/kvm_asm.h b/arch/arm64/include/asm/kvm_asm.h index eb7490d232a0..40a0a24e6c98 100644 --- a/arch/arm64/include/asm/kvm_asm.h +++ b/arch/arm64/include/asm/kvm_asm.h | |||
@@ -54,7 +54,7 @@ extern void __vgic_v3_init_lrs(void); | |||
54 | 54 | ||
55 | extern u32 __kvm_get_mdcr_el2(void); | 55 | extern u32 __kvm_get_mdcr_el2(void); |
56 | 56 | ||
57 | extern void __init_stage2_translation(void); | 57 | extern u32 __init_stage2_translation(void); |
58 | 58 | ||
59 | #endif | 59 | #endif |
60 | 60 | ||
diff --git a/arch/arm64/include/asm/kvm_host.h b/arch/arm64/include/asm/kvm_host.h index b7e82a795ac9..f5c6bd2541ef 100644 --- a/arch/arm64/include/asm/kvm_host.h +++ b/arch/arm64/include/asm/kvm_host.h | |||
@@ -369,11 +369,12 @@ int kvm_arm_vcpu_arch_get_attr(struct kvm_vcpu *vcpu, | |||
369 | int kvm_arm_vcpu_arch_has_attr(struct kvm_vcpu *vcpu, | 369 | int kvm_arm_vcpu_arch_has_attr(struct kvm_vcpu *vcpu, |
370 | struct kvm_device_attr *attr); | 370 | struct kvm_device_attr *attr); |
371 | 371 | ||
372 | /* #define kvm_call_hyp(f, ...) __kvm_call_hyp(kvm_ksym_ref(f), ##__VA_ARGS__) */ | ||
373 | |||
374 | static inline void __cpu_init_stage2(void) | 372 | static inline void __cpu_init_stage2(void) |
375 | { | 373 | { |
376 | kvm_call_hyp(__init_stage2_translation); | 374 | u32 parange = kvm_call_hyp(__init_stage2_translation); |
375 | |||
376 | WARN_ONCE(parange < 40, | ||
377 | "PARange is %d bits, unsupported configuration!", parange); | ||
377 | } | 378 | } |
378 | 379 | ||
379 | #endif /* __ARM64_KVM_HOST_H__ */ | 380 | #endif /* __ARM64_KVM_HOST_H__ */ |