[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-arm] [PATCH 01/13] arm: Use the mmu_idx we're passed in arm_cpu_do
From: |
Peter Maydell |
Subject: |
[Qemu-arm] [PATCH 01/13] arm: Use the mmu_idx we're passed in arm_cpu_do_unaligned_access() |
Date: |
Tue, 25 Apr 2017 13:06:58 +0100 |
When identifying the DFSR format for an alignment fault, use
the mmu index that we are passed, rather than calling cpu_mmu_index()
to get the mmu index for the current CPU state. This doesn't actually
make any difference since the only cases where the current MMU index
differs from the index used for the load are the "unprivileged
load/store" instructions, and in that case the mmu index may
differ but the translation regime is the same (apart from the
"use from Hyp mode" case which is UNPREDICTABLE).
However it's the more logical thing to do.
Signed-off-by: Peter Maydell <address@hidden>
---
target/arm/op_helper.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target/arm/op_helper.c b/target/arm/op_helper.c
index 156b825..de24815 100644
--- a/target/arm/op_helper.c
+++ b/target/arm/op_helper.c
@@ -208,7 +208,7 @@ void arm_cpu_do_unaligned_access(CPUState *cs, vaddr vaddr,
/* the DFSR for an alignment fault depends on whether we're using
* the LPAE long descriptor format, or the short descriptor format
*/
- if (arm_s1_regime_using_lpae_format(env, cpu_mmu_index(env, false))) {
+ if (arm_s1_regime_using_lpae_format(env, mmu_idx)) {
env->exception.fsr = (1 << 9) | 0x21;
} else {
env->exception.fsr = 0x1;
--
2.7.4
- [Qemu-arm] [PATCH 00/13] armv7m: Implement MPU support, Peter Maydell, 2017/04/25
- [Qemu-arm] [PATCH 06/13] arm: Don't let no-MPU PMSA cores write to SCTLR.M, Peter Maydell, 2017/04/25
- [Qemu-arm] [PATCH 08/13] armv7m: Improve "-d mmu" tracing for PMSAv7 MPU, Peter Maydell, 2017/04/25
- [Qemu-arm] [PATCH 13/13] arm: Implement HFNMIENA support for M profile MPU, Peter Maydell, 2017/04/25
- [Qemu-arm] [PATCH 11/13] armv7m: Classify faults as MemManage or BusFault, Peter Maydell, 2017/04/25
- [Qemu-arm] [PATCH 10/13] arm: All M profile cores are PMSA, Peter Maydell, 2017/04/25
- [Qemu-arm] [PATCH 03/13] arm: Use different ARMMMUIdx values for M profile, Peter Maydell, 2017/04/25
- [Qemu-arm] [PATCH 05/13] arm: Don't clear ARM_FEATURE_PMSA for no-mpu configs, Peter Maydell, 2017/04/25
- [Qemu-arm] [PATCH 02/13] arm: Add support for M profile CPUs having different MMU index semantics, Peter Maydell, 2017/04/25
- [Qemu-arm] [PATCH 01/13] arm: Use the mmu_idx we're passed in arm_cpu_do_unaligned_access(),
Peter Maydell <=
- [Qemu-arm] [PATCH 04/13] arm: Clean up handling of no-MPU PMSA CPUs, Peter Maydell, 2017/04/25
- [Qemu-arm] [PATCH 09/13] armv7m: Implement M profile default memory map, Peter Maydell, 2017/04/25
- [Qemu-arm] [PATCH 07/13] arm: Remove unnecessary check on cpu->pmsav7_dregion, Peter Maydell, 2017/04/25
- [Qemu-arm] [PATCH 12/13] arm: add MPU support to M profile CPUs, Peter Maydell, 2017/04/25