[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 18/26] target/arm: Export aa64_va_parameters to inte
From: |
Richard Henderson |
Subject: |
[Qemu-devel] [PATCH 18/26] target/arm: Export aa64_va_parameters to internals.h |
Date: |
Fri, 7 Dec 2018 04:36:23 -0600 |
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.
Signed-off-by: Richard Henderson <address@hidden>
---
target/arm/internals.h | 29 +++++++++++++++++++++++++++++
target/arm/helper.c | 16 ++--------------
2 files changed, 31 insertions(+), 14 deletions(-)
diff --git a/target/arm/internals.h b/target/arm/internals.h
index 6bc0daf560..4d25b267e8 100644
--- a/target/arm/internals.h
+++ b/target/arm/internals.h
@@ -912,4 +912,33 @@ void arm_cpu_update_virq(ARMCPU *cpu);
*/
void arm_cpu_update_vfiq(ARMCPU *cpu);
+typedef struct ARMVAParameters {
+ unsigned tsz : 8;
+ unsigned select : 1;
+ bool tbi : 1;
+ bool epd : 1;
+ bool hpd : 1;
+ bool ha : 1;
+ bool hd : 1;
+ bool using16k : 1;
+ 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 3ad5909b1e..c73525f813 100644
--- a/target/arm/helper.c
+++ b/target/arm/helper.c
@@ -9712,20 +9712,8 @@ static uint8_t convert_stage2_attrs(CPUARMState *env,
uint8_t s2attrs)
return (hiattr << 6) | (hihint << 4) | (loattr << 2) | lohint;
}
-typedef struct ARMVAParameters {
- unsigned tsz : 8;
- unsigned select : 1;
- bool tbi : 1;
- bool epd : 1;
- bool hpd : 1;
- bool ha : 1;
- bool hd : 1;
- bool using16k : 1;
- bool using64k : 1;
-} ARMVAParameters;
-
-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
- Re: [Qemu-devel] [PATCH 11/26] target/arm: Rearrange decode in disas_uncond_b_reg, (continued)
- [Qemu-devel] [PATCH 15/26] target/arm: Introduce arm_mmu_idx, Richard Henderson, 2018/12/07
- [Qemu-devel] [PATCH 13/26] target/arm: Decode Load/store register (pac), Richard Henderson, 2018/12/07
- [Qemu-devel] [PATCH 12/26] target/arm: Decode PAuth within disas_uncond_b_reg, Richard Henderson, 2018/12/07
- [Qemu-devel] [PATCH 14/26] target/arm: Move cpu_mmu_index out of line, Richard Henderson, 2018/12/07
- [Qemu-devel] [PATCH 17/26] target/arm: Reuse aa64_va_parameters for setting tbflags, Richard Henderson, 2018/12/07
- [Qemu-devel] [PATCH 18/26] target/arm: Export aa64_va_parameters to internals.h,
Richard Henderson <=
- [Qemu-devel] [PATCH 19/26] target/arm: Implement pauth_strip, Richard Henderson, 2018/12/07
- [Qemu-devel] [PATCH 20/26] target/arm: Implement pauth_auth, Richard Henderson, 2018/12/07
- [Qemu-devel] [PATCH 16/26] target/arm: Create ARMVAParameters and helpers, Richard Henderson, 2018/12/07
- [Qemu-devel] [PATCH 21/26] target/arm: Implement pauth_addpac, Richard Henderson, 2018/12/07
- [Qemu-devel] [PATCH 22/26] target/arm: Implement pauth_computepac, Richard Henderson, 2018/12/07
- [Qemu-devel] [PATCH 23/26] target/arm: Add PAuth system registers, Richard Henderson, 2018/12/07
- [Qemu-devel] [PATCH 24/26] target/arm: Enable PAuth for user-only -cpu max, Richard Henderson, 2018/12/07