[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 16/66] target/arm: Add is_secure parameter to pmsav7_use_backg
From: |
Richard Henderson |
Subject: |
[PATCH v2 16/66] target/arm: Add is_secure parameter to pmsav7_use_background_region |
Date: |
Mon, 22 Aug 2022 08:26:51 -0700 |
Remove the use of regime_is_secure from pmsav7_use_background_region,
using the new parameter instead.
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/arm/ptw.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/target/arm/ptw.c b/target/arm/ptw.c
index fccac2d71f..b7911e88c1 100644
--- a/target/arm/ptw.c
+++ b/target/arm/ptw.c
@@ -1489,7 +1489,7 @@ static bool m_is_system_region(CPUARMState *env, uint32_t
address)
}
static bool pmsav7_use_background_region(ARMCPU *cpu, ARMMMUIdx mmu_idx,
- bool is_user)
+ bool is_secure, bool is_user)
{
/*
* Return true if we should use the default memory map as a
@@ -1502,8 +1502,7 @@ static bool pmsav7_use_background_region(ARMCPU *cpu,
ARMMMUIdx mmu_idx,
}
if (arm_feature(env, ARM_FEATURE_M)) {
- return env->v7m.mpu_ctrl[regime_is_secure(env, mmu_idx)]
- & R_V7M_MPU_CTRL_PRIVDEFENA_MASK;
+ return env->v7m.mpu_ctrl[is_secure] & R_V7M_MPU_CTRL_PRIVDEFENA_MASK;
} else {
return regime_sctlr(env, mmu_idx) & SCTLR_BR;
}
@@ -1516,6 +1515,7 @@ static bool get_phys_addr_pmsav7(CPUARMState *env,
uint32_t address,
{
ARMCPU *cpu = env_archcpu(env);
int n;
+ bool secure = regime_is_secure(env, mmu_idx);
bool is_user = regime_is_user(env, mmu_idx);
result->phys = address;
@@ -1618,7 +1618,7 @@ static bool get_phys_addr_pmsav7(CPUARMState *env,
uint32_t address,
}
if (n == -1) { /* no hits */
- if (!pmsav7_use_background_region(cpu, mmu_idx, is_user)) {
+ if (!pmsav7_use_background_region(cpu, mmu_idx, secure, is_user)) {
/* background fault */
fi->type = ARMFault_Background;
return true;
@@ -1738,7 +1738,7 @@ bool pmsav8_mpu_lookup(CPUARMState *env, uint32_t address,
} else if (m_is_ppb_region(env, address)) {
hit = true;
} else {
- if (pmsav7_use_background_region(cpu, mmu_idx, is_user)) {
+ if (pmsav7_use_background_region(cpu, mmu_idx, secure, is_user)) {
hit = true;
}
--
2.34.1
- [PATCH v2 08/66] target/arm: Use GetPhysAddrResult in get_phys_addr_pmsav8, (continued)
- [PATCH v2 08/66] target/arm: Use GetPhysAddrResult in get_phys_addr_pmsav8, Richard Henderson, 2022/08/22
- [PATCH v2 07/66] target/arm: Use GetPhysAddrResult in get_phys_addr_pmsav7, Richard Henderson, 2022/08/22
- [PATCH v2 12/66] target/arm: Add secure parameter to pmsav8_mpu_lookup, Richard Henderson, 2022/08/22
- [PATCH v2 11/66] target/arm: Add is_secure parameter to v8m_security_lookup, Richard Henderson, 2022/08/22
- [PATCH v2 10/66] target/arm: Remove is_subpage argument to pmsav8_mpu_lookup, Richard Henderson, 2022/08/22
- [PATCH v2 09/66] target/arm: Use GetPhysAddrResult in pmsav8_mpu_lookup, Richard Henderson, 2022/08/22
- [PATCH v2 13/66] target/arm: Add is_secure parameter to get_phys_addr_v5, Richard Henderson, 2022/08/22
- [PATCH v2 15/66] target/arm: Add secure parameter to get_phys_addr_pmsav8, Richard Henderson, 2022/08/22
- [PATCH v2 17/66] target/arm: Add is_secure parameter to get_phys_addr_lpae, Richard Henderson, 2022/08/22
- [PATCH v2 18/66] target/arm: Add secure parameter to get_phys_addr_pmsav7, Richard Henderson, 2022/08/22
- [PATCH v2 16/66] target/arm: Add is_secure parameter to pmsav7_use_background_region,
Richard Henderson <=
- [PATCH v2 14/66] target/arm: Add is_secure parameter to get_phys_addr_v6, Richard Henderson, 2022/08/22
- [PATCH v2 20/66] target/arm: Add is_secure parameter to get_phys_addr_pmsav5, Richard Henderson, 2022/08/22
- [PATCH v2 19/66] target/arm: Add is_secure parameter to regime_translation_disabled, Richard Henderson, 2022/08/22
- [PATCH v2 21/66] target/arm: Split out get_phys_addr_with_secure, Richard Henderson, 2022/08/22
- [PATCH v2 23/66] target/arm: Add TBFLAG_M32.SECURE, Richard Henderson, 2022/08/22
- [PATCH v2 24/66] target/arm: Merge regime_is_secure into get_phys_addr, Richard Henderson, 2022/08/22
- [PATCH v2 22/66] target/arm: Add is_secure parameter to v7m_read_half_insn, Richard Henderson, 2022/08/22
- [PATCH v2 25/66] target/arm: Add is_secure parameter to do_ats_write, Richard Henderson, 2022/08/22
- [PATCH v2 28/66] target/arm: Drop secure check for HCR.TGE vs SCTLR_EL1.M, Richard Henderson, 2022/08/22
- [PATCH v2 27/66] target/arm: Reorg regime_translation_disabled, Richard Henderson, 2022/08/22