[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 28/60] target/m68k: Make m68k_cpu_tlb_fill sysemu only
From: |
Richard Henderson |
Subject: |
[PULL 28/60] target/m68k: Make m68k_cpu_tlb_fill sysemu only |
Date: |
Tue, 2 Nov 2021 07:07:08 -0400 |
The fallback code in cpu_loop_exit_sigsegv is sufficient
for m68k linux-user.
Remove the code from cpu_loop that handled EXCP_ACCESS.
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
linux-user/m68k/cpu_loop.c | 10 ----------
target/m68k/cpu.c | 2 +-
target/m68k/helper.c | 6 +-----
3 files changed, 2 insertions(+), 16 deletions(-)
diff --git a/linux-user/m68k/cpu_loop.c b/linux-user/m68k/cpu_loop.c
index ebf32be78f..790bd558c3 100644
--- a/linux-user/m68k/cpu_loop.c
+++ b/linux-user/m68k/cpu_loop.c
@@ -90,16 +90,6 @@ void cpu_loop(CPUM68KState *env)
case EXCP_INTERRUPT:
/* just indicate that signals should be handled asap */
break;
- case EXCP_ACCESS:
- {
- info.si_signo = TARGET_SIGSEGV;
- info.si_errno = 0;
- /* XXX: check env->error_code */
- info.si_code = TARGET_SEGV_MAPERR;
- info._sifields._sigfault._addr = env->mmu.ar;
- queue_signal(env, info.si_signo, QEMU_SI_FAULT, &info);
- }
- break;
case EXCP_DEBUG:
info.si_signo = TARGET_SIGTRAP;
info.si_errno = 0;
diff --git a/target/m68k/cpu.c b/target/m68k/cpu.c
index 66d22d1189..c7aeb7da9c 100644
--- a/target/m68k/cpu.c
+++ b/target/m68k/cpu.c
@@ -515,9 +515,9 @@ static const struct SysemuCPUOps m68k_sysemu_ops = {
static const struct TCGCPUOps m68k_tcg_ops = {
.initialize = m68k_tcg_init,
- .tlb_fill = m68k_cpu_tlb_fill,
#ifndef CONFIG_USER_ONLY
+ .tlb_fill = m68k_cpu_tlb_fill,
.cpu_exec_interrupt = m68k_cpu_exec_interrupt,
.do_interrupt = m68k_cpu_do_interrupt,
.do_transaction_failed = m68k_cpu_transaction_failed,
diff --git a/target/m68k/helper.c b/target/m68k/helper.c
index 137a3e1a3d..5728e48585 100644
--- a/target/m68k/helper.c
+++ b/target/m68k/helper.c
@@ -978,16 +978,12 @@ void m68k_set_irq_level(M68kCPU *cpu, int level, uint8_t
vector)
}
}
-#endif
-
bool m68k_cpu_tlb_fill(CPUState *cs, vaddr address, int size,
MMUAccessType qemu_access_type, int mmu_idx,
bool probe, uintptr_t retaddr)
{
M68kCPU *cpu = M68K_CPU(cs);
CPUM68KState *env = &cpu->env;
-
-#ifndef CONFIG_USER_ONLY
hwaddr physical;
int prot;
int access_type;
@@ -1051,12 +1047,12 @@ bool m68k_cpu_tlb_fill(CPUState *cs, vaddr address, int
size,
if (!(access_type & ACCESS_STORE)) {
env->mmu.ssw |= M68K_RW_040;
}
-#endif
cs->exception_index = EXCP_ACCESS;
env->mmu.ar = address;
cpu_loop_exit_restore(cs, retaddr);
}
+#endif /* !CONFIG_USER_ONLY */
uint32_t HELPER(bitrev)(uint32_t x)
{
--
2.25.1
- [PULL 06/60] linux-user: Reorg handling for SIGSEGV, (continued)
- [PULL 06/60] linux-user: Reorg handling for SIGSEGV, Richard Henderson, 2021/11/02
- [PULL 12/60] linux-user/host/aarch64: Populate host_signal.h, Richard Henderson, 2021/11/02
- [PULL 08/60] linux-user/host/ppc: Populate host_signal.h, Richard Henderson, 2021/11/02
- [PULL 17/60] linux-user/host/riscv: Improve host_signal_write, Richard Henderson, 2021/11/02
- [PULL 21/60] target/alpha: Implement alpha_cpu_record_sigsegv, Richard Henderson, 2021/11/02
- [PULL 19/60] hw/core: Add TCGCPUOps.record_sigsegv, Richard Henderson, 2021/11/02
- [PULL 25/60] target/hexagon: Remove hexagon_cpu_tlb_fill, Richard Henderson, 2021/11/02
- [PULL 30/60] target/mips: Make mips_cpu_tlb_fill sysemu only, Richard Henderson, 2021/11/02
- [PULL 05/60] configure: Merge riscv32 and riscv64 host architectures, Richard Henderson, 2021/11/02
- [PULL 15/60] linux-user/host/riscv: Populate host_signal.h, Richard Henderson, 2021/11/02
- [PULL 28/60] target/m68k: Make m68k_cpu_tlb_fill sysemu only,
Richard Henderson <=
- [PULL 32/60] linux-user/openrisc: Abort for EXCP_RANGE, EXCP_FPE, Richard Henderson, 2021/11/02
- [PULL 24/60] target/cris: Make cris_cpu_tlb_fill sysemu only, Richard Henderson, 2021/11/02
- [PULL 23/60] target/arm: Implement arm_cpu_record_sigsegv, Richard Henderson, 2021/11/02
- [PULL 35/60] target/riscv: Make riscv_cpu_tlb_fill sysemu only, Richard Henderson, 2021/11/02
- [PULL 31/60] target/nios2: Implement nios2_cpu_record_sigsegv, Richard Henderson, 2021/11/02
- [PULL 10/60] linux-user/host/sparc: Populate host_signal.h, Richard Henderson, 2021/11/02
- [PULL 27/60] target/i386: Implement x86_cpu_record_sigsegv, Richard Henderson, 2021/11/02
- [PULL 22/60] target/arm: Use cpu_loop_exit_sigsegv for mte tag lookup, Richard Henderson, 2021/11/02
- [PULL 38/60] target/sh4: Make sh4_cpu_tlb_fill sysemu only, Richard Henderson, 2021/11/02
- [PULL 34/60] target/ppc: Implement ppc_cpu_record_sigsegv, Richard Henderson, 2021/11/02