[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 36/41] target/s390x: Use probe_access_flags in s390_probe_acce
From: |
Richard Henderson |
Subject: |
[PATCH v2 36/41] target/s390x: Use probe_access_flags in s390_probe_access |
Date: |
Sat, 18 Sep 2021 11:45:22 -0700 |
Not sure why the user-only code wasn't rewritten to use
probe_access_flags at the same time that the sysemu code
was converted. For the purpose of user-only, this is an
exact replacement.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/s390x/tcg/mem_helper.c | 18 +++++-------------
1 file changed, 5 insertions(+), 13 deletions(-)
diff --git a/target/s390x/tcg/mem_helper.c b/target/s390x/tcg/mem_helper.c
index 0bf775a37d..596270e45d 100644
--- a/target/s390x/tcg/mem_helper.c
+++ b/target/s390x/tcg/mem_helper.c
@@ -142,20 +142,12 @@ static int s390_probe_access(CPUArchState *env,
target_ulong addr, int size,
MMUAccessType access_type, int mmu_idx,
bool nonfault, void **phost, uintptr_t ra)
{
+#if defined(CONFIG_USER_ONLY)
+ return probe_access_flags(env, addr, access_type, mmu_idx,
+ nonfault, phost, ra);
+#else
int flags;
-#if defined(CONFIG_USER_ONLY)
- flags = page_get_flags(addr);
- if (!(flags & (access_type == MMU_DATA_LOAD ? PAGE_READ :
PAGE_WRITE_ORG))) {
- env->__excp_addr = addr;
- flags = (flags & PAGE_VALID) ? PGM_PROTECTION : PGM_ADDRESSING;
- if (nonfault) {
- return flags;
- }
- tcg_s390_program_interrupt(env, flags, ra);
- }
- *phost = g2h(env_cpu(env), addr);
-#else
/*
* For !CONFIG_USER_ONLY, we cannot rely on TLB_INVALID_MASK or haddr==NULL
* to detect if there was an exception during tlb_fill().
@@ -174,8 +166,8 @@ static int s390_probe_access(CPUArchState *env,
target_ulong addr, int size,
(access_type == MMU_DATA_STORE
? BP_MEM_WRITE : BP_MEM_READ), ra);
}
-#endif
return 0;
+#endif
}
static int access_prepare_nf(S390Access *access, CPUS390XState *env,
--
2.25.1
- Re: [PATCH v2 20/41] linux-user: Add raise_sigsegv, (continued)
- [PATCH v2 22/41] target/arm: Use raise_sigsegv for mte tag lookup, Richard Henderson, 2021/09/18
- [PATCH v2 23/41] target/arm: Implement arm_cpu_record_sigsegv, Richard Henderson, 2021/09/18
- [PATCH v2 21/41] target/alpha: Make alpha_cpu_tlb_fill sysemu only, Richard Henderson, 2021/09/18
- [PATCH v2 26/41] target/hppa: Make hppa_cpu_tlb_fill sysemu only, Richard Henderson, 2021/09/18
- [PATCH v2 29/41] target/microblaze: Make mb_cpu_tlb_fill sysemu only, Richard Henderson, 2021/09/18
- [PATCH v2 35/41] target/riscv: Make riscv_cpu_tlb_fill sysemu only, Richard Henderson, 2021/09/18
- [PATCH v2 27/41] target/i386: Implement x86_cpu_record_sigsegv, Richard Henderson, 2021/09/18
- [PATCH v2 36/41] target/s390x: Use probe_access_flags in s390_probe_access,
Richard Henderson <=
- [PATCH v2 39/41] target/sparc: Make sparc_cpu_tlb_fill sysemu only, Richard Henderson, 2021/09/18
- [PATCH v2 30/41] target/mips: Make mips_cpu_tlb_fill sysemu only, Richard Henderson, 2021/09/18
- [PATCH v2 28/41] target/m68k: Make m68k_cpu_tlb_fill sysemu only, Richard Henderson, 2021/09/18
- [PATCH v2 37/41] target/s390x: Implement s390_cpu_record_sigsegv, Richard Henderson, 2021/09/18
- [PATCH v2 38/41] target/sh4: Make sh4_cpu_tlb_fill sysemu only, Richard Henderson, 2021/09/18
- [PATCH v2 32/41] linux-user/openrisc: Adjust signal for EXCP_RANGE, EXCP_FPE, Richard Henderson, 2021/09/18
- [PATCH v2 31/41] target/nios2: Make nios2_cpu_tlb_fill sysemu only, Richard Henderson, 2021/09/18
- [PATCH v2 25/41] target/hexagon: Remove hexagon_cpu_tlb_fill, Richard Henderson, 2021/09/18
- [PATCH v2 34/41] target/ppc: Implement ppc_cpu_record_sigsegv, Richard Henderson, 2021/09/18