summary refs log tree commit diff stats
path: root/target/arm/ptw.c
diff options
context:
space:
mode:
authorJean-Philippe Brucker <jean-philippe@linaro.org>2023-08-22 17:31:12 +0100
committerPeter Maydell <peter.maydell@linaro.org>2023-08-22 17:31:12 +0100
commitf1269a98aaf8e2884cb067d09bce0d3056ede289 (patch)
treeb2f16e15973bf474f774dddbb379fac4e6e5a211 /target/arm/ptw.c
parentceaa97465f58cf2b3b4fc07a3b1067eb6f48d2e3 (diff)
downloadfocaccia-qemu-f1269a98aaf8e2884cb067d09bce0d3056ede289.tar.gz
focaccia-qemu-f1269a98aaf8e2884cb067d09bce0d3056ede289.zip
target/arm: Skip granule protection checks for AT instructions
GPC checks are not performed on the output address for AT instructions,
as stated by ARM DDI 0487J in D8.12.2:

  When populating PAR_EL1 with the result of an address translation
  instruction, granule protection checks are not performed on the final
  output address of a successful translation.

Rename get_phys_addr_with_secure(), since it's only used to handle AT
instructions.

Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 20230809123706.1842548-4-jean-philippe@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'target/arm/ptw.c')
-rw-r--r--target/arm/ptw.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/target/arm/ptw.c b/target/arm/ptw.c
index 7a69968dd7..ca4de6e399 100644
--- a/target/arm/ptw.c
+++ b/target/arm/ptw.c
@@ -3420,16 +3420,17 @@ static bool get_phys_addr_gpc(CPUARMState *env, S1Translate *ptw,
     return false;
 }
 
-bool get_phys_addr_with_secure(CPUARMState *env, target_ulong address,
-                               MMUAccessType access_type, ARMMMUIdx mmu_idx,
-                               bool is_secure, GetPhysAddrResult *result,
-                               ARMMMUFaultInfo *fi)
+bool get_phys_addr_with_secure_nogpc(CPUARMState *env, target_ulong address,
+                                     MMUAccessType access_type,
+                                     ARMMMUIdx mmu_idx, bool is_secure,
+                                     GetPhysAddrResult *result,
+                                     ARMMMUFaultInfo *fi)
 {
     S1Translate ptw = {
         .in_mmu_idx = mmu_idx,
         .in_space = arm_secure_to_space(is_secure),
     };
-    return get_phys_addr_gpc(env, &ptw, address, access_type, result, fi);
+    return get_phys_addr_nogpc(env, &ptw, address, access_type, result, fi);
 }
 
 bool get_phys_addr(CPUARMState *env, target_ulong address,