[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 25/25] target/arm: Check V7VE as well as LPAE in arm_pamax
From: |
Peter Maydell |
Subject: |
[PULL 25/25] target/arm: Check V7VE as well as LPAE in arm_pamax |
Date: |
Mon, 27 Jun 2022 11:22:36 +0100 |
From: Richard Henderson <richard.henderson@linaro.org>
In machvirt_init we create a cpu but do not fully initialize it.
Thus the propagation of V7VE to LPAE has not been done, and we
compute the wrong value for some v7 cpus, e.g. cortex-a15.
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1078
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reported-by: He Zhe <zhe.he@windriver.com>
Message-id: 20220619001541.131672-3-richard.henderson@linaro.org
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
target/arm/ptw.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/target/arm/ptw.c b/target/arm/ptw.c
index 07f7a218611..da478104f05 100644
--- a/target/arm/ptw.c
+++ b/target/arm/ptw.c
@@ -47,7 +47,13 @@ unsigned int arm_pamax(ARMCPU *cpu)
assert(parange < ARRAY_SIZE(pamax_map));
return pamax_map[parange];
}
- if (arm_feature(&cpu->env, ARM_FEATURE_LPAE)) {
+
+ /*
+ * In machvirt_init, we call arm_pamax on a cpu that is not fully
+ * initialized, so we can't rely on the propagation done in realize.
+ */
+ if (arm_feature(&cpu->env, ARM_FEATURE_LPAE) ||
+ arm_feature(&cpu->env, ARM_FEATURE_V7VE)) {
/* v7 with LPAE */
return 40;
}
--
2.25.1
- [PULL 05/25] target/arm: Add SMEEXC_EL to TB flags, (continued)
- [PULL 05/25] target/arm: Add SMEEXC_EL to TB flags, Peter Maydell, 2022/06/27
- [PULL 09/25] target/arm: Add SMCR_ELx, Peter Maydell, 2022/06/27
- [PULL 13/25] target/arm: Implement SMSTART, SMSTOP, Peter Maydell, 2022/06/27
- [PULL 17/25] target/arm: Generalize cpu_arm_{get, set}_default_vec_len, Peter Maydell, 2022/06/27
- [PULL 01/25] sphinx: change default language to 'en', Peter Maydell, 2022/06/27
- [PULL 18/25] target/arm: Move arm_cpu_*_finalize to internals.h, Peter Maydell, 2022/06/27
- [PULL 19/25] target/arm: Unexport aarch64_add_*_properties, Peter Maydell, 2022/06/27
- [PULL 21/25] target/arm: Introduce sve_vqm1_for_el_sm, Peter Maydell, 2022/06/27
- [PULL 20/25] target/arm: Add cpu properties for SME, Peter Maydell, 2022/06/27
- [PULL 23/25] target/arm: Move pred_{full, gvec}_reg_{offset, size} to translate-a64.h, Peter Maydell, 2022/06/27
- [PULL 25/25] target/arm: Check V7VE as well as LPAE in arm_pamax,
Peter Maydell <=
- [PULL 03/25] target/arm: Catch invalid kvm state also for hvf, Peter Maydell, 2022/06/27
- [PULL 08/25] target/arm: Add SVCR, Peter Maydell, 2022/06/27
- [PULL 22/25] target/arm: Add SVL to TB flags, Peter Maydell, 2022/06/27
- [PULL 14/25] target/arm: Move error for sve%d property to arm_cpu_sve_finalize, Peter Maydell, 2022/06/27
- [PULL 24/25] target/arm: Extend arm_pamax to more than aarch64, Peter Maydell, 2022/06/27
- Re: [PULL 00/25] target-arm queue, Richard Henderson, 2022/06/27