[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH for-6.2 15/43] target/sparc: Implement do_unaligned_access fo
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH for-6.2 15/43] target/sparc: Implement do_unaligned_access for user-only |
Date: |
Thu, 29 Jul 2021 11:40:20 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 |
On 7/29/21 2:46 AM, Richard Henderson wrote:
> Cc: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
> linux-user/sparc/cpu_loop.c | 11 +++++++++++
> target/sparc/cpu.c | 2 +-
> target/sparc/ldst_helper.c | 2 --
> 3 files changed, 12 insertions(+), 3 deletions(-)
>
> diff --git a/linux-user/sparc/cpu_loop.c b/linux-user/sparc/cpu_loop.c
> index 02532f198d..612e77807e 100644
> --- a/linux-user/sparc/cpu_loop.c
> +++ b/linux-user/sparc/cpu_loop.c
> @@ -272,6 +272,17 @@ void cpu_loop (CPUSPARCState *env)
> queue_signal(env, info.si_signo, QEMU_SI_FAULT, &info);
> }
> break;
> + case TT_UNALIGNED:
> + info.si_signo = TARGET_SIGBUS;
> + info.si_errno = 0;
> + info.si_code = TARGET_BUS_ADRALN;
> +#ifdef TARGET_SPARC64
> + info._sifields._sigfault._addr = env->dmmu.sfar;
> +#else
> + info._sifields._sigfault._addr = env->mmuregs[4];
> +#endif
> + 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/sparc/cpu.c b/target/sparc/cpu.c
> index da6b30ec74..d33d41e837 100644
> --- a/target/sparc/cpu.c
> +++ b/target/sparc/cpu.c
> @@ -865,11 +865,11 @@ static const struct TCGCPUOps sparc_tcg_ops = {
> .synchronize_from_tb = sparc_cpu_synchronize_from_tb,
> .cpu_exec_interrupt = sparc_cpu_exec_interrupt,
> .tlb_fill = sparc_cpu_tlb_fill,
> + .do_unaligned_access = sparc_cpu_do_unaligned_access,
>
> #ifndef CONFIG_USER_ONLY
> .do_interrupt = sparc_cpu_do_interrupt,
> .do_transaction_failed = sparc_cpu_do_transaction_failed,
> - .do_unaligned_access = sparc_cpu_do_unaligned_access,
> #endif /* !CONFIG_USER_ONLY */
> };
> #endif /* CONFIG_TCG */
> diff --git a/target/sparc/ldst_helper.c b/target/sparc/ldst_helper.c
> index 7367b48c8b..69b812e68c 100644
> --- a/target/sparc/ldst_helper.c
> +++ b/target/sparc/ldst_helper.c
> @@ -1954,7 +1954,6 @@ void sparc_cpu_do_transaction_failed(CPUState *cs,
> hwaddr physaddr,
> }
> #endif
>
> -#if !defined(CONFIG_USER_ONLY)
> void QEMU_NORETURN sparc_cpu_do_unaligned_access(CPUState *cs, vaddr addr,
> MMUAccessType access_type,
> int mmu_idx,
> @@ -1973,4 +1972,3 @@ void QEMU_NORETURN
> sparc_cpu_do_unaligned_access(CPUState *cs, vaddr addr,
>
> cpu_raise_exception_ra(env, TT_UNALIGNED, retaddr);
> }
> -#endif
>
Somewhere around this patch I get:
SKIPPED signals on sparc64 because BROKEN awaiting sigframe clean-ups
and vdso support
TEST test-mmap (default) on sparc64
timeout: the monitored command dumped core
Bus error
make[2]: *** [tests/tcg/multiarch/Makefile.target:49: run-test-mmap]
Error 135
make[1]: *** [tests/tcg/Makefile.qemu:102: run-guest-tests] Error 2
make: *** [tests/Makefile.include:63: run-tcg-tests-sparc64-linux-user]
Error 2
- [PATCH for-6.2 18/43] accel/tcg: Drop signness in tracing in cputlb.c, (continued)
- [PATCH for-6.2 18/43] accel/tcg: Drop signness in tracing in cputlb.c, Richard Henderson, 2021/07/28
- [PATCH for-6.2 11/43] target/sh4: Set fault address in superh_cpu_do_unaligned_access, Richard Henderson, 2021/07/28
- [PATCH for-6.2 13/43] target/sparc: Remove DEBUG_UNALIGNED, Richard Henderson, 2021/07/28
- [PATCH for-6.2 14/43] target/sparc: Set fault address in sparc_cpu_do_unaligned_access, Richard Henderson, 2021/07/28
- [PATCH for-6.2 19/43] tcg: Expand MO_SIZE to 3 bits, Richard Henderson, 2021/07/28
- [PATCH for-6.2 15/43] target/sparc: Implement do_unaligned_access for user-only, Richard Henderson, 2021/07/28
- Re: [PATCH for-6.2 15/43] target/sparc: Implement do_unaligned_access for user-only,
Philippe Mathieu-Daudé <=
- [PATCH for-6.2 21/43] tcg: Split out MemOpIdx to exec/memopidx.h, Richard Henderson, 2021/07/28
- [PATCH for-6.2 24/43] accel/tcg: Pass MemOpIdx to atomic_trace_*_post, Richard Henderson, 2021/07/28
- [PATCH for-6.2 25/43] plugins: Reorg arguments to qemu_plugin_vcpu_mem_cb, Richard Henderson, 2021/07/28
- [PATCH for-6.2 20/43] tcg: Rename TCGMemOpIdx to MemOpIdx, Richard Henderson, 2021/07/28
- [PATCH for-6.2 22/43] trace/mem: Pass MemOpIdx to trace_mem_get_info, Richard Henderson, 2021/07/28
- [PATCH for-6.2 23/43] accel/tcg: Remove double bswap for helper_atomic_sto_*_mmu, Richard Henderson, 2021/07/28