[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 15/62] target/arm: Use GetPhysAddrResult in get_phys_addr_pmsav8
From: |
Richard Henderson |
Subject: |
[PATCH 15/62] target/arm: Use GetPhysAddrResult in get_phys_addr_pmsav8 |
Date: |
Sun, 3 Jul 2022 13:53:32 +0530 |
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/arm/ptw.c | 28 ++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/target/arm/ptw.c b/target/arm/ptw.c
index 4b69ecb1b9..ef28258d51 100644
--- a/target/arm/ptw.c
+++ b/target/arm/ptw.c
@@ -1963,8 +1963,7 @@ void v8m_security_lookup(CPUARMState *env, uint32_t
address,
static bool get_phys_addr_pmsav8(CPUARMState *env, uint32_t address,
MMUAccessType access_type, ARMMMUIdx mmu_idx,
- hwaddr *phys_ptr, MemTxAttrs *txattrs,
- int *prot, target_ulong *page_size,
+ GetPhysAddrResult *result,
ARMMMUFaultInfo *fi)
{
uint32_t secure = regime_is_secure(env, mmu_idx);
@@ -1999,9 +1998,9 @@ static bool get_phys_addr_pmsav8(CPUARMState *env,
uint32_t address,
} else {
fi->type = ARMFault_QEMU_SFault;
}
- *page_size = sattrs.subpage ? 1 : TARGET_PAGE_SIZE;
- *phys_ptr = address;
- *prot = 0;
+ result->page_size = sattrs.subpage ? 1 : TARGET_PAGE_SIZE;
+ result->phys = address;
+ result->prot = 0;
return true;
}
} else {
@@ -2011,7 +2010,7 @@ static bool get_phys_addr_pmsav8(CPUARMState *env,
uint32_t address,
* might downgrade a secure access to nonsecure.
*/
if (sattrs.ns) {
- txattrs->secure = false;
+ result->attrs.secure = false;
} else if (!secure) {
/*
* NS access to S memory must fault.
@@ -2024,17 +2023,19 @@ static bool get_phys_addr_pmsav8(CPUARMState *env,
uint32_t address,
* for M_FAKE_FSR_SFAULT in arm_v7m_cpu_do_interrupt().
*/
fi->type = ARMFault_QEMU_SFault;
- *page_size = sattrs.subpage ? 1 : TARGET_PAGE_SIZE;
- *phys_ptr = address;
- *prot = 0;
+ result->page_size = sattrs.subpage ? 1 : TARGET_PAGE_SIZE;
+ result->phys = address;
+ result->prot = 0;
return true;
}
}
}
- ret = pmsav8_mpu_lookup(env, address, access_type, mmu_idx, phys_ptr,
- txattrs, prot, &mpu_is_subpage, fi, NULL);
- *page_size = sattrs.subpage || mpu_is_subpage ? 1 : TARGET_PAGE_SIZE;
+ ret = pmsav8_mpu_lookup(env, address, access_type, mmu_idx,
+ &result->phys, &result->attrs, &result->prot,
+ &mpu_is_subpage, fi, NULL);
+ result->page_size =
+ sattrs.subpage || mpu_is_subpage ? 1 : TARGET_PAGE_SIZE;
return ret;
}
@@ -2410,8 +2411,7 @@ bool get_phys_addr(CPUARMState *env, target_ulong address,
if (arm_feature(env, ARM_FEATURE_V8)) {
/* PMSAv8 */
ret = get_phys_addr_pmsav8(env, address, access_type, mmu_idx,
- &result->phys, &result->attrs,
- &result->prot, &result->page_size, fi);
+ result, fi);
} else if (arm_feature(env, ARM_FEATURE_V7)) {
/* PMSAv7 */
ret = get_phys_addr_pmsav7(env, address, access_type, mmu_idx,
--
2.34.1
- [PATCH 05/62] target/arm: Use PageEntryExtra for MTE, (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, 2022/07/03
- [PATCH 15/62] target/arm: Use GetPhysAddrResult in get_phys_addr_pmsav8,
Richard Henderson <=
- [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, 2022/07/03