[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 09/39] target/arm: Use GetPhysAddrResult in get_phys_addr_pmsav8
From: |
Peter Maydell |
Subject: |
[PULL 09/39] target/arm: Use GetPhysAddrResult in get_phys_addr_pmsav8 |
Date: |
Thu, 22 Sep 2022 17:35:06 +0100 |
From: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20220822152741.1617527-9-richard.henderson@linaro.org
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@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 36b108907fc..2286f6e12db 100644
--- a/target/arm/ptw.c
+++ b/target/arm/ptw.c
@@ -1967,8 +1967,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);
@@ -2003,9 +2002,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 {
@@ -2015,7 +2014,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.
@@ -2028,17 +2027,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;
}
@@ -2416,8 +2417,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.25.1
- [PULL 19/39] target/arm: Add is_secure parameter to get_phys_addr_pmsav5, (continued)
- [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
- [PULL 08/39] target/arm: Use GetPhysAddrResult in get_phys_addr_pmsav7, Peter Maydell, 2022/09/22
- [PULL 04/39] target/arm: Use GetPhysAddrResult in get_phys_addr_lpae, Peter Maydell, 2022/09/22
- [PULL 09/39] target/arm: Use GetPhysAddrResult in get_phys_addr_pmsav8,
Peter Maydell <=
- [PULL 12/39] target/arm: Add is_secure parameter to v8m_security_lookup, Peter Maydell, 2022/09/22
- [PULL 16/39] target/arm: Add secure parameter to get_phys_addr_pmsav8, Peter Maydell, 2022/09/22
- [PULL 01/39] hw/net/can: fix Xilinx ZynqMP CAN RX FIFO logic, Peter Maydell, 2022/09/22
- [PULL 31/39] ui/curses: Avoid dynamic stack allocation, Peter Maydell, 2022/09/22
- [PULL 10/39] target/arm: Use GetPhysAddrResult in pmsav8_mpu_lookup, Peter Maydell, 2022/09/22
- [PULL 32/39] tests/unit/test-vmstate: Avoid dynamic stack allocation, Peter Maydell, 2022/09/22
- [PULL 21/39] hw/net/lan9118: Signal TSFL_INT flag when TX FIFO reaches specified level, Peter Maydell, 2022/09/22
- [PULL 23/39] chardev/baum: Use definitions to avoid dynamic stack allocation, Peter Maydell, 2022/09/22
- [PULL 28/39] hw/intc/xics: Avoid dynamic stack allocation, Peter Maydell, 2022/09/22
- [PULL 18/39] target/arm: Add secure parameter to get_phys_addr_pmsav7, Peter Maydell, 2022/09/22