[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 13/62] target/arm: Use GetPhysAddrResult in get_phys_addr_pmsav5
From: |
Richard Henderson |
Subject: |
[PATCH 13/62] target/arm: Use GetPhysAddrResult in get_phys_addr_pmsav5 |
Date: |
Sun, 3 Jul 2022 13:53:30 +0530 |
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/arm/ptw.c | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/target/arm/ptw.c b/target/arm/ptw.c
index 490a57ec5a..f2e429574d 100644
--- a/target/arm/ptw.c
+++ b/target/arm/ptw.c
@@ -1347,7 +1347,7 @@ do_fault:
static bool get_phys_addr_pmsav5(CPUARMState *env, uint32_t address,
MMUAccessType access_type, ARMMMUIdx mmu_idx,
- hwaddr *phys_ptr, int *prot,
+ GetPhysAddrResult *result,
ARMMMUFaultInfo *fi)
{
int n;
@@ -1357,12 +1357,12 @@ static bool get_phys_addr_pmsav5(CPUARMState *env,
uint32_t address,
if (regime_translation_disabled(env, mmu_idx)) {
/* MPU disabled. */
- *phys_ptr = address;
- *prot = PAGE_READ | PAGE_WRITE | PAGE_EXEC;
+ result->phys = address;
+ result->prot = PAGE_READ | PAGE_WRITE | PAGE_EXEC;
return false;
}
- *phys_ptr = address;
+ result->phys = address;
for (n = 7; n >= 0; n--) {
base = env->cp15.c6_region[n];
if ((base & 1) == 0) {
@@ -1398,16 +1398,16 @@ static bool get_phys_addr_pmsav5(CPUARMState *env,
uint32_t address,
fi->level = 1;
return true;
}
- *prot = PAGE_READ | PAGE_WRITE;
+ result->prot = PAGE_READ | PAGE_WRITE;
break;
case 2:
- *prot = PAGE_READ;
+ result->prot = PAGE_READ;
if (!is_user) {
- *prot |= PAGE_WRITE;
+ result->prot |= PAGE_WRITE;
}
break;
case 3:
- *prot = PAGE_READ | PAGE_WRITE;
+ result->prot = PAGE_READ | PAGE_WRITE;
break;
case 5:
if (is_user) {
@@ -1415,10 +1415,10 @@ static bool get_phys_addr_pmsav5(CPUARMState *env,
uint32_t address,
fi->level = 1;
return true;
}
- *prot = PAGE_READ;
+ result->prot = PAGE_READ;
break;
case 6:
- *prot = PAGE_READ;
+ result->prot = PAGE_READ;
break;
default:
/* Bad permission. */
@@ -1426,7 +1426,7 @@ static bool get_phys_addr_pmsav5(CPUARMState *env,
uint32_t address,
fi->level = 1;
return true;
}
- *prot |= PAGE_EXEC;
+ result->prot |= PAGE_EXEC;
return false;
}
@@ -2421,7 +2421,7 @@ bool get_phys_addr(CPUARMState *env, target_ulong address,
} else {
/* Pre-v7 MPU */
ret = get_phys_addr_pmsav5(env, address, access_type, mmu_idx,
- &result->phys, &result->prot, fi);
+ result, fi);
}
qemu_log_mask(CPU_LOG_MMU, "PMSA MPU lookup for %s at 0x%08" PRIx32
" mmu_idx %u -> %s (prot %c%c%c)\n",
--
2.34.1
- Re: [PATCH 06/62] target/arm: Use PageEntryExtra for BTI, (continued)
- [PATCH 05/62] target/arm: Use PageEntryExtra for MTE, Richard Henderson, 2022/07/03
- [PATCH 07/62] include/exec: Remove target_tlb_bitN from MemTxAttrs, Richard Henderson, 2022/07/03
- [PATCH 08/62] target/arm: Create GetPhysAddrResult, Richard Henderson, 2022/07/03
- [PATCH 09/62] target/arm: Fix ipa_secure in get_phys_addr, Richard Henderson, 2022/07/03
- [PATCH 10/62] target/arm: Use GetPhysAddrResult in get_phys_addr_lpae, Richard Henderson, 2022/07/03
- [PATCH 11/62] target/arm: Use GetPhysAddrResult in get_phys_addr_v6, Richard Henderson, 2022/07/03
- [PATCH 12/62] target/arm: Use GetPhysAddrResult in get_phys_addr_v5, Richard Henderson, 2022/07/03
- [PATCH 13/62] target/arm: Use GetPhysAddrResult in get_phys_addr_pmsav5,
Richard Henderson <=
- [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