[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v6 53/66] target/sh4: Set fault address in superh_cpu_do_unaligne
From: |
Richard Henderson |
Subject: |
[PATCH v6 53/66] target/sh4: Set fault address in superh_cpu_do_unaligned_access |
Date: |
Sat, 30 Oct 2021 10:16:22 -0700 |
We ought to have been recording the virtual address for reporting
to the guest trap handler.
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/sh4/op_helper.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/target/sh4/op_helper.c b/target/sh4/op_helper.c
index c996dce7df..752669825f 100644
--- a/target/sh4/op_helper.c
+++ b/target/sh4/op_helper.c
@@ -29,6 +29,9 @@ void superh_cpu_do_unaligned_access(CPUState *cs, vaddr addr,
MMUAccessType access_type,
int mmu_idx, uintptr_t retaddr)
{
+ CPUSH4State *env = cs->env_ptr;
+
+ env->tea = addr;
switch (access_type) {
case MMU_INST_FETCH:
case MMU_DATA_LOAD:
@@ -37,6 +40,8 @@ void superh_cpu_do_unaligned_access(CPUState *cs, vaddr addr,
case MMU_DATA_STORE:
cs->exception_index = 0x100;
break;
+ default:
+ g_assert_not_reached();
}
cpu_loop_exit_restore(cs, retaddr);
}
--
2.25.1
- [PATCH v6 42/66] hw/core: Add TCGCPUOps.record_sigbus, (continued)
- [PATCH v6 42/66] hw/core: Add TCGCPUOps.record_sigbus, Richard Henderson, 2021/10/30
- [PATCH v6 43/66] linux-user: Add cpu_loop_exit_sigbus, Richard Henderson, 2021/10/30
- [PATCH v6 50/66] target/ppc: Restrict ppc_cpu_do_unaligned_access to sysemu, Richard Henderson, 2021/10/30
- [PATCH v6 49/66] target/ppc: Set fault address in ppc_cpu_do_unaligned_access, Richard Henderson, 2021/10/30
- [PATCH v6 59/66] tcg: Add helper_unaligned_{ld, st} for user-only sigbus, Richard Henderson, 2021/10/30
- [PATCH v6 57/66] accel/tcg: Report unaligned atomics for user-only, Richard Henderson, 2021/10/30
- [PATCH v6 60/66] linux-user: Handle BUS_ADRALN in host_signal_handler, Richard Henderson, 2021/10/30
- [PATCH v6 56/66] target/sparc: Set fault address in sparc_cpu_do_unaligned_access, Richard Henderson, 2021/10/30
- [PATCH v6 62/66] linux-user: Disable more prctl subcodes, Richard Henderson, 2021/10/30
- [PATCH v6 54/66] target/sparc: Remove DEBUG_UNALIGNED, Richard Henderson, 2021/10/30
- [PATCH v6 53/66] target/sh4: Set fault address in superh_cpu_do_unaligned_access,
Richard Henderson <=
- [PATCH v6 65/66] target/hppa: Implement prctl_unalign_sigbus, Richard Henderson, 2021/10/30
- [PATCH v6 48/66] target/ppc: Move SPR_DSISR setting to powerpc_excp, Richard Henderson, 2021/10/30
- [PATCH v6 58/66] accel/tcg: Report unaligned load/store for user-only, Richard Henderson, 2021/10/30
- [PATCH v6 63/66] linux-user: Add code for PR_GET/SET_UNALIGN, Richard Henderson, 2021/10/30
- [PATCH v6 47/66] target/microblaze: Do not set MO_ALIGN for user-only, Richard Henderson, 2021/10/30
- [PATCH v6 55/66] target/sparc: Split out build_sfsr, Richard Henderson, 2021/10/30
- [PATCH v6 61/66] linux-user: Split out do_prctl and subroutines, Richard Henderson, 2021/10/30
- [PATCH v6 64/66] target/alpha: Implement prctl_unalign_sigbus, Richard Henderson, 2021/10/30
- [PATCH v6 66/66] target/sh4: Implement prctl_unalign_sigbus, Richard Henderson, 2021/10/30
- Re: [PATCH v6 00/66] user-only: Cleanup SIGSEGV and SIGBUS handling, Philippe Mathieu-Daudé, 2021/10/31