[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 13/39] target/arm: Add secure parameter to pmsav8_mpu_lookup
From: |
Peter Maydell |
Subject: |
[PULL 13/39] target/arm: Add secure parameter to pmsav8_mpu_lookup |
Date: |
Thu, 22 Sep 2022 17:35:10 +0100 |
From: Richard Henderson <richard.henderson@linaro.org>
Remove the use of regime_is_secure from pmsav8_mpu_lookup,
passing the new parameter to the lookup instead.
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20220822152741.1617527-13-richard.henderson@linaro.org
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
target/arm/internals.h | 4 ++--
target/arm/m_helper.c | 2 +-
target/arm/ptw.c | 7 +++----
3 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/target/arm/internals.h b/target/arm/internals.h
index e97f5c3d47e..307a5965053 100644
--- a/target/arm/internals.h
+++ b/target/arm/internals.h
@@ -1152,8 +1152,8 @@ bool get_phys_addr(CPUARMState *env, target_ulong address,
bool pmsav8_mpu_lookup(CPUARMState *env, uint32_t address,
MMUAccessType access_type, ARMMMUIdx mmu_idx,
- GetPhysAddrResult *result, ARMMMUFaultInfo *fi,
- uint32_t *mregion);
+ bool is_secure, GetPhysAddrResult *result,
+ ARMMMUFaultInfo *fi, uint32_t *mregion);
void arm_log_exception(CPUState *cs);
diff --git a/target/arm/m_helper.c b/target/arm/m_helper.c
index 45fbf195590..5ee4ee15b36 100644
--- a/target/arm/m_helper.c
+++ b/target/arm/m_helper.c
@@ -2810,7 +2810,7 @@ uint32_t HELPER(v7m_tt)(CPUARMState *env, uint32_t addr,
uint32_t op)
ARMMMUFaultInfo fi = {};
/* We can ignore the return value as prot is always set */
- pmsav8_mpu_lookup(env, addr, MMU_DATA_LOAD, mmu_idx,
+ pmsav8_mpu_lookup(env, addr, MMU_DATA_LOAD, mmu_idx, targetsec,
&res, &fi, &mregion);
if (mregion == -1) {
mrvalid = false;
diff --git a/target/arm/ptw.c b/target/arm/ptw.c
index 74d2f63359f..308a9cc3ac9 100644
--- a/target/arm/ptw.c
+++ b/target/arm/ptw.c
@@ -1701,8 +1701,8 @@ static bool get_phys_addr_pmsav7(CPUARMState *env,
uint32_t address,
bool pmsav8_mpu_lookup(CPUARMState *env, uint32_t address,
MMUAccessType access_type, ARMMMUIdx mmu_idx,
- GetPhysAddrResult *result, ARMMMUFaultInfo *fi,
- uint32_t *mregion)
+ bool secure, GetPhysAddrResult *result,
+ ARMMMUFaultInfo *fi, uint32_t *mregion)
{
/*
* Perform a PMSAv8 MPU lookup (without also doing the SAU check
@@ -1716,7 +1716,6 @@ bool pmsav8_mpu_lookup(CPUARMState *env, uint32_t address,
*/
ARMCPU *cpu = env_archcpu(env);
bool is_user = regime_is_user(env, mmu_idx);
- uint32_t secure = regime_is_secure(env, mmu_idx);
int n;
int matchregion = -1;
bool hit = false;
@@ -2035,7 +2034,7 @@ static bool get_phys_addr_pmsav8(CPUARMState *env,
uint32_t address,
}
}
- ret = pmsav8_mpu_lookup(env, address, access_type, mmu_idx,
+ ret = pmsav8_mpu_lookup(env, address, access_type, mmu_idx, secure,
result, fi, NULL);
if (sattrs.subpage) {
result->page_size = 1;
--
2.25.1
- [PULL 00/39] target-arm queue, Peter Maydell, 2022/09/22
- [PULL 05/39] target/arm: Use GetPhysAddrResult in get_phys_addr_v6, Peter Maydell, 2022/09/22
- [PULL 07/39] target/arm: Use GetPhysAddrResult in get_phys_addr_pmsav5, Peter Maydell, 2022/09/22
- [PULL 03/39] target/arm: Create GetPhysAddrResult, Peter Maydell, 2022/09/22
- [PULL 15/39] target/arm: Add is_secure parameter to get_phys_addr_v6, Peter Maydell, 2022/09/22
- [PULL 22/39] chardev/baum: Replace magic values by X_MAX / Y_MAX definitions, Peter Maydell, 2022/09/22
- [PULL 06/39] target/arm: Use GetPhysAddrResult in get_phys_addr_v5, Peter Maydell, 2022/09/22
- [PULL 13/39] target/arm: Add secure parameter to pmsav8_mpu_lookup,
Peter Maydell <=
- [PULL 14/39] target/arm: Add is_secure parameter to get_phys_addr_v5, Peter Maydell, 2022/09/22
- [PULL 17/39] target/arm: Add is_secure parameter to pmsav7_use_background_region, Peter Maydell, 2022/09/22
- [PULL 19/39] target/arm: Add is_secure parameter to get_phys_addr_pmsav5, Peter Maydell, 2022/09/22
- [PULL 27/39] hw/ppc/pnv: Avoid dynamic stack allocation, Peter Maydell, 2022/09/22
- [PULL 38/39] configure: Check mkdir result directly, not via $?, Peter Maydell, 2022/09/22
- [PULL 34/39] configure: Remove unused meson_args variable, Peter Maydell, 2022/09/22
- [PULL 39/39] configure: Avoid use of 'local' as it is non-POSIX, Peter Maydell, 2022/09/22
- [PULL 33/39] configure: Remove unused python_version variable, Peter Maydell, 2022/09/22
- [PULL 02/39] target/arm: Fix alignment for VLD4.32, Peter Maydell, 2022/09/22
- [PULL 11/39] target/arm: Remove is_subpage argument to pmsav8_mpu_lookup, Peter Maydell, 2022/09/22