[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v7 36/60] target/s390x: Use probe_access_flags in s390_probe_acce
From: |
Richard Henderson |
Subject: |
[PATCH v7 36/60] target/s390x: Use probe_access_flags in s390_probe_access |
Date: |
Mon, 1 Nov 2021 13:27:05 -0400 |
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.
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
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 17e3f83641..362a30d99e 100644
--- a/target/s390x/tcg/mem_helper.c
+++ b/target/s390x/tcg/mem_helper.c
@@ -141,20 +141,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().
@@ -173,8 +165,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
- [PATCH v7 15/60] linux-user/host/riscv: Populate host_signal.h, (continued)
- [PATCH v7 15/60] linux-user/host/riscv: Populate host_signal.h, Richard Henderson, 2021/11/01
- [PATCH v7 19/60] hw/core: Add TCGCPUOps.record_sigsegv, Richard Henderson, 2021/11/01
- [PATCH v7 31/60] target/nios2: Implement nios2_cpu_record_sigsegv, Richard Henderson, 2021/11/01
- [PATCH v7 39/60] target/sparc: Make sparc_cpu_tlb_fill sysemu only, Richard Henderson, 2021/11/01
- [PATCH v7 26/60] target/hppa: Make hppa_cpu_tlb_fill sysemu only, Richard Henderson, 2021/11/01
- [PATCH v7 09/60] linux-user/host/alpha: Populate host_signal.h, Richard Henderson, 2021/11/01
- [PATCH v7 30/60] target/mips: Make mips_cpu_tlb_fill sysemu only, Richard Henderson, 2021/11/01
- [PATCH v7 22/60] target/arm: Use cpu_loop_exit_sigsegv for mte tag lookup, Richard Henderson, 2021/11/01
- [PATCH v7 24/60] target/cris: Make cris_cpu_tlb_fill sysemu only, Richard Henderson, 2021/11/01
- [PATCH v7 32/60] linux-user/openrisc: Abort for EXCP_RANGE, EXCP_FPE, Richard Henderson, 2021/11/01
- [PATCH v7 36/60] target/s390x: Use probe_access_flags in s390_probe_access,
Richard Henderson <=
- [PATCH v7 37/60] target/s390x: Implement s390_cpu_record_sigsegv, Richard Henderson, 2021/11/01
- [PATCH v7 35/60] target/riscv: Make riscv_cpu_tlb_fill sysemu only, Richard Henderson, 2021/11/01
- [PATCH v7 25/60] target/hexagon: Remove hexagon_cpu_tlb_fill, Richard Henderson, 2021/11/01
- [PATCH v7 38/60] target/sh4: Make sh4_cpu_tlb_fill sysemu only, Richard Henderson, 2021/11/01
- [PATCH v7 33/60] target/openrisc: Make openrisc_cpu_tlb_fill sysemu only, Richard Henderson, 2021/11/01
- [PATCH v7 23/60] target/arm: Implement arm_cpu_record_sigsegv, Richard Henderson, 2021/11/01
- [PATCH v7 29/60] target/microblaze: Make mb_cpu_tlb_fill sysemu only, Richard Henderson, 2021/11/01
- [PATCH v7 42/60] hw/core: Add TCGCPUOps.record_sigbus, Richard Henderson, 2021/11/01
- [PATCH v7 40/60] target/xtensa: Make xtensa_cpu_tlb_fill sysemu only, Richard Henderson, 2021/11/01
- [PATCH v7 44/60] target/alpha: Implement alpha_cpu_record_sigbus, Richard Henderson, 2021/11/01