[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v3 20/31] target/arm: Export aa64_va_parameters to i
From: |
Richard Henderson |
Subject: |
[Qemu-devel] [PATCH v3 20/31] target/arm: Export aa64_va_parameters to internals.h |
Date: |
Wed, 9 Jan 2019 08:31:18 +1000 |
We need to reuse this from helper-a64.c. Provide a stub
definition for CONFIG_USER_ONLY. This matches the stub
definitions that we removed for arm_regime_tbi{0,1} before.
Reviewed-by: Peter Maydell <address@hidden>
Signed-off-by: Richard Henderson <address@hidden>
---
target/arm/internals.h | 17 +++++++++++++++++
target/arm/helper.c | 4 ++--
2 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/target/arm/internals.h b/target/arm/internals.h
index fdda2c866a..82cf685695 100644
--- a/target/arm/internals.h
+++ b/target/arm/internals.h
@@ -956,4 +956,21 @@ typedef struct ARMVAParameters {
bool using64k : 1;
} ARMVAParameters;
+#ifdef CONFIG_USER_ONLY
+static inline ARMVAParameters aa64_va_parameters(CPUARMState *env,
+ uint64_t va,
+ ARMMMUIdx mmu_idx, bool data)
+{
+ return (ARMVAParameters) {
+ /* 48-bit address space */
+ .tsz = 16,
+ /* We can't handle tagged addresses properly in user-only mode */
+ .tbi = false,
+ };
+}
+#else
+ARMVAParameters aa64_va_parameters(CPUARMState *env, uint64_t va,
+ ARMMMUIdx mmu_idx, bool data);
+#endif
+
#endif
diff --git a/target/arm/helper.c b/target/arm/helper.c
index f934c80c28..f4538c9f82 100644
--- a/target/arm/helper.c
+++ b/target/arm/helper.c
@@ -9744,8 +9744,8 @@ static uint8_t convert_stage2_attrs(CPUARMState *env,
uint8_t s2attrs)
return (hiattr << 6) | (hihint << 4) | (loattr << 2) | lohint;
}
-static ARMVAParameters aa64_va_parameters(CPUARMState *env, uint64_t va,
- ARMMMUIdx mmu_idx, bool data)
+ARMVAParameters aa64_va_parameters(CPUARMState *env, uint64_t va,
+ ARMMMUIdx mmu_idx, bool data)
{
uint64_t tcr = regime_tcr(env, mmu_idx)->raw_tcr;
uint32_t el = regime_el(env, mmu_idx);
--
2.17.2
- [Qemu-devel] [PATCH v3 10/31] target/arm: Move helper_exception_return to helper-a64.c, (continued)
- [Qemu-devel] [PATCH v3 10/31] target/arm: Move helper_exception_return to helper-a64.c, Richard Henderson, 2019/01/08
- [Qemu-devel] [PATCH v3 12/31] target/arm: Rearrange decode in disas_uncond_b_reg, Richard Henderson, 2019/01/08
- [Qemu-devel] [PATCH v3 13/31] target/arm: Decode PAuth within disas_uncond_b_reg, Richard Henderson, 2019/01/08
- [Qemu-devel] [PATCH v3 16/31] target/arm: Introduce arm_mmu_idx, Richard Henderson, 2019/01/08
- [Qemu-devel] [PATCH v3 14/31] target/arm: Decode Load/store register (pac), Richard Henderson, 2019/01/08
- [Qemu-devel] [PATCH v3 15/31] target/arm: Move cpu_mmu_index out of line, Richard Henderson, 2019/01/08
- [Qemu-devel] [PATCH v3 17/31] target/arm: Introduce arm_stage1_mmu_idx, Richard Henderson, 2019/01/08
- [Qemu-devel] [PATCH v3 20/31] target/arm: Export aa64_va_parameters to internals.h,
Richard Henderson <=
- [Qemu-devel] [PATCH v3 19/31] target/arm: Merge TBFLAG_AA_TB{0, 1} to TBII, Richard Henderson, 2019/01/08
- [Qemu-devel] [PATCH v3 18/31] target/arm: Create ARMVAParameters and helpers, Richard Henderson, 2019/01/08
- [Qemu-devel] [PATCH v3 21/31] target/arm: Add aa64_va_parameters_both, Richard Henderson, 2019/01/08
- [Qemu-devel] [PATCH v3 22/31] target/arm: Decode TBID from TCR, Richard Henderson, 2019/01/08