[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 24/62] target/arm: Add is_secure parameter to get_phys_addr_lpae
From: |
Richard Henderson |
Subject: |
[PATCH 24/62] target/arm: Add is_secure parameter to get_phys_addr_lpae |
Date: |
Sun, 3 Jul 2022 13:53:41 +0530 |
Remove the use of regime_is_secure from get_phys_addr_lpae.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/arm/ptw.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/target/arm/ptw.c b/target/arm/ptw.c
index 23cfccce6c..b883826643 100644
--- a/target/arm/ptw.c
+++ b/target/arm/ptw.c
@@ -16,8 +16,8 @@
static bool get_phys_addr_lpae(CPUARMState *env, uint64_t address,
MMUAccessType access_type, ARMMMUIdx mmu_idx,
- bool s1_is_el0, GetPhysAddrResult *result,
- ARMMMUFaultInfo *fi)
+ bool is_secure, bool s1_is_el0,
+ GetPhysAddrResult *result, ARMMMUFaultInfo *fi)
__attribute__((nonnull));
/* This mapping is common between ID_AA64MMFR0.PARANGE and TCR_ELx.{I}PS. */
@@ -207,8 +207,8 @@ static hwaddr S1_ptw_translate(CPUARMState *env, ARMMMUIdx
mmu_idx,
GetPhysAddrResult s2 = {};
int ret;
- ret = get_phys_addr_lpae(env, addr, MMU_DATA_LOAD, s2_mmu_idx, false,
- &s2, fi);
+ ret = get_phys_addr_lpae(env, addr, MMU_DATA_LOAD, s2_mmu_idx,
+ *is_secure, false, &s2, fi);
if (ret) {
assert(fi->type != ARMFault_None);
fi->s2addr = addr;
@@ -961,8 +961,8 @@ static bool check_s2_mmu_setup(ARMCPU *cpu, bool is_aa64,
int level,
*/
static bool get_phys_addr_lpae(CPUARMState *env, uint64_t address,
MMUAccessType access_type, ARMMMUIdx mmu_idx,
- bool s1_is_el0, GetPhysAddrResult *result,
- ARMMMUFaultInfo *fi)
+ bool is_secure, bool s1_is_el0,
+ GetPhysAddrResult *result, ARMMMUFaultInfo *fi)
{
ARMCPU *cpu = env_archcpu(env);
/* Read an LPAE long-descriptor translation table. */
@@ -1179,7 +1179,7 @@ static bool get_phys_addr_lpae(CPUARMState *env, uint64_t
address,
* remain non-secure. We implement this by just ORing in the NSTable/NS
* bits at each step.
*/
- tableattrs = regime_is_secure(env, mmu_idx) ? 0 : (1 << 4);
+ tableattrs = is_secure ? 0 : (1 << 4);
for (;;) {
uint64_t descriptor;
bool nstable;
@@ -2331,7 +2331,7 @@ bool get_phys_addr(CPUARMState *env, target_ulong address,
memset(result, 0, sizeof(*result));
ret = get_phys_addr_lpae(env, ipa, access_type, s2_mmu_idx,
- is_el0, result, fi);
+ ipa_secure, is_el0, result, fi);
fi->s2addr = ipa;
/* Combine the S1 and S2 perms. */
@@ -2499,8 +2499,8 @@ bool get_phys_addr(CPUARMState *env, target_ulong address,
}
if (regime_using_lpae_format(env, mmu_idx)) {
- return get_phys_addr_lpae(env, address, access_type, mmu_idx, false,
- result, fi);
+ return get_phys_addr_lpae(env, address, access_type, mmu_idx,
+ is_secure, false, result, fi);
} else if (regime_sctlr(env, mmu_idx) & SCTLR_XP) {
return get_phys_addr_v6(env, address, access_type, mmu_idx,
is_secure, result, fi);
--
2.34.1
- [PATCH 15/62] target/arm: Use GetPhysAddrResult in get_phys_addr_pmsav8, (continued)
- [PATCH 15/62] target/arm: Use GetPhysAddrResult in get_phys_addr_pmsav8, Richard Henderson, 2022/07/03
- [PATCH 14/62] target/arm: Use GetPhysAddrResult in get_phys_addr_pmsav7, Richard Henderson, 2022/07/03
- [PATCH 16/62] target/arm: Use GetPhysAddrResult in pmsav8_mpu_lookup, Richard Henderson, 2022/07/03
- [PATCH 17/62] target/arm: Remove is_subpage argument to pmsav8_mpu_lookup, Richard Henderson, 2022/07/03
- [PATCH 18/62] target/arm: Add is_secure parameter to v8m_security_lookup, Richard Henderson, 2022/07/03
- [PATCH 19/62] target/arm: Add is_secure parameter to pmsav8_mpu_lookup, Richard Henderson, 2022/07/03
- [PATCH 20/62] target/arm: Add is_secure parameter to get_phys_addr_v5, Richard Henderson, 2022/07/03
- [PATCH 21/62] target/arm: Add is_secure parameter to get_phys_addr_v6, Richard Henderson, 2022/07/03
- [PATCH 22/62] target/arm: Add secure parameter to get_phys_addr_pmsav8, Richard Henderson, 2022/07/03
- [PATCH 23/62] target/arm: Add is_secure parameter to pmsav7_use_background_region, Richard Henderson, 2022/07/03
- [PATCH 24/62] target/arm: Add is_secure parameter to get_phys_addr_lpae,
Richard Henderson <=
- [PATCH 25/62] target/arm: Add is_secure parameter to get_phys_addr_pmsav7, Richard Henderson, 2022/07/03
- [PATCH 26/62] target/arm: Add is_secure parameter to regime_translation_disabled, Richard Henderson, 2022/07/03
- [PATCH 27/62] target/arm: Add is_secure parameter to get_phys_addr_pmsav5, Richard Henderson, 2022/07/03
- [PATCH 28/62] target/arm: Split out get_phys_addr_with_secure, Richard Henderson, 2022/07/03
- [PATCH 29/62] target/arm: Add is_secure parameter to v7m_read_half_insn, Richard Henderson, 2022/07/03
- [PATCH 30/62] target/arm: Add TBFLAG_M32.SECURE, Richard Henderson, 2022/07/03
- [PATCH 31/62] target/arm: Merge regime_is_secure into get_phys_addr, Richard Henderson, 2022/07/03
- [PATCH 32/62] target/arm: Add is_secure parameter to do_ats_write, Richard Henderson, 2022/07/03
- [PATCH 33/62] target/arm: Fold secure and non-secure a-profile mmu indexes, Richard Henderson, 2022/07/03
- [PATCH 34/62] target/arm: Reorg regime_translation_disabled, Richard Henderson, 2022/07/03