From: Richard Henderson <richard.henderson@linaro.org>
To: qemu-devel@nongnu.org
Cc: qemu-arm@nongnu.org
Subject: [PATCH 10/20] target/arm: Convert get_phys_addr_disabled to access_perm
Date: Mon, 7 Jul 2025 14:21:01 -0600 [thread overview]
Message-ID: <20250707202111.293787-11-richard.henderson@linaro.org> (raw)
In-Reply-To: <20250707202111.293787-1-richard.henderson@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 f1edbbee5b..5b8040a174 100644
--- a/target/arm/ptw.c
+++ b/target/arm/ptw.c
@@ -3193,7 +3193,7 @@ static ARMCacheAttrs combine_cacheattrs(uint64_t hcr,
static bool get_phys_addr_disabled(CPUARMState *env,
S1Translate *ptw,
vaddr address,
- MMUAccessType access_type,
+ unsigned access_perm,
GetPhysAddrResult *result,
ARMMMUFaultInfo *fi)
{
@@ -3219,7 +3219,7 @@ static bool get_phys_addr_disabled(CPUARMState *env,
int addrtop, tbi;
tbi = aa64_va_parameter_tbi(tcr, mmu_idx);
- if (access_type == MMU_INST_FETCH) {
+ if (access_perm & PAGE_EXEC) {
tbi &= ~aa64_va_parameter_tbid(tcr, mmu_idx);
}
tbi = (tbi >> extract64(address, 55, 1)) & 1;
@@ -3253,7 +3253,7 @@ static bool get_phys_addr_disabled(CPUARMState *env,
}
}
if (memattr == 0) {
- if (access_type == MMU_INST_FETCH) {
+ if (access_perm & PAGE_EXEC) {
if (regime_sctlr(env, mmu_idx) & SCTLR_I) {
memattr = 0xee; /* Normal, WT, RA, NT */
} else {
@@ -3404,7 +3404,7 @@ static bool get_phys_addr_nogpc(CPUARMState *env, S1Translate *ptw,
case ARMMMUIdx_Phys_Root:
case ARMMMUIdx_Phys_Realm:
/* Checking Phys early avoids special casing later vs regime_el. */
- return get_phys_addr_disabled(env, ptw, address, access_type,
+ return get_phys_addr_disabled(env, ptw, address, 1 << access_type,
result, fi);
case ARMMMUIdx_Stage1_E0:
@@ -3504,7 +3504,7 @@ static bool get_phys_addr_nogpc(CPUARMState *env, S1Translate *ptw,
/* Definitely a real MMU, not an MPU */
if (regime_translation_disabled(env, mmu_idx, ptw->in_space)) {
- return get_phys_addr_disabled(env, ptw, address, access_type,
+ return get_phys_addr_disabled(env, ptw, address, 1 << access_type,
result, fi);
}
--
2.43.0
next prev parent reply other threads:[~2025-07-07 20:59 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-07 20:20 [PATCH 00/20] target/arm: Implement FEAT_ATS1A Richard Henderson
2025-07-07 20:20 ` [PATCH 01/20] target/arm: Convert get_phys_addr_v5 to access_perm Richard Henderson
2025-07-07 20:20 ` [PATCH 02/20] target/arm: Convert get_phys_addr_v6 " Richard Henderson
2025-07-07 20:20 ` [PATCH 03/20] target/arm: Convert get_phys_addr_lpae " Richard Henderson
2025-07-10 11:59 ` Peter Maydell
2025-07-10 15:06 ` Richard Henderson
2025-07-07 20:20 ` [PATCH 04/20] target/arm: Convert get_phys_addr_pmsav5 " Richard Henderson
2025-07-07 20:20 ` [PATCH 05/20] target/arm: Convert get_phys_addr_pmsav7 " Richard Henderson
2025-07-07 20:20 ` [PATCH 06/20] target/arm: Convert pmsav8_mpu_lookup " Richard Henderson
2025-07-07 20:20 ` [PATCH 07/20] target/arm: Convert v8m_is_sau_exempt " Richard Henderson
2025-07-10 12:01 ` Peter Maydell
2025-07-10 16:19 ` Richard Henderson
2025-07-07 20:20 ` [PATCH 08/20] target/arm: Convert v8m_security_lookup " Richard Henderson
2025-07-07 20:21 ` [PATCH 09/20] target/arm: Convert get_phys_addr_pmsav8 " Richard Henderson
2025-07-07 20:21 ` Richard Henderson [this message]
2025-07-07 20:21 ` [PATCH 11/20] target/arm: Convert get_phys_addr_nogpc " Richard Henderson
2025-07-07 20:21 ` [PATCH 12/20] target/arm: Convert get_phys_addr_gpc " Richard Henderson
2025-07-07 20:21 ` [PATCH 13/20] target/arm: Convert get_phys_addr_with_space_nogpc " Richard Henderson
2025-07-07 20:21 ` [PATCH 14/20] target/arm: Convert get_phys_addr " Richard Henderson
2025-07-07 20:21 ` [PATCH 15/20] target/arm: Skip permission check from arm_cpu_get_phys_page_attrs_debug Richard Henderson
2025-07-07 20:21 ` [PATCH 16/20] target/arm: Introduce get_phys_addr_for_at Richard Henderson
2025-07-07 20:21 ` [PATCH 17/20] target/arm: Skip AF and DB updates for AccessType_AT Richard Henderson
2025-07-07 20:21 ` [PATCH 18/20] target/arm: Convert do_ats_write to access_perm Richard Henderson
2025-07-07 20:21 ` [PATCH 19/20] target/arm: Fill in HFGITR_EL2 bits for Arm v9.5 Richard Henderson
2025-07-07 20:21 ` [PATCH 20/20] target/arm: Implement FEAT_ATS1A Richard Henderson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250707202111.293787-11-richard.henderson@linaro.org \
--to=richard.henderson@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).