[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH for-6.2 07/43] target/ppc: Set fault address in ppc_cpu_do_un
From: |
Cédric Le Goater |
Subject: |
Re: [PATCH for-6.2 07/43] target/ppc: Set fault address in ppc_cpu_do_unaligned_access |
Date: |
Fri, 30 Jul 2021 18:58:58 +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:
> We ought to have been recording the virtual address for reporting
> to the guest trap handler.
>
> Cc: qemu-ppc@nongnu.org
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
> ---
> target/ppc/excp_helper.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/target/ppc/excp_helper.c b/target/ppc/excp_helper.c
> index a79a0ed465..0b2c6de442 100644
> --- a/target/ppc/excp_helper.c
> +++ b/target/ppc/excp_helper.c
> @@ -1503,6 +1503,8 @@ void ppc_cpu_do_unaligned_access(CPUState *cs, vaddr
> vaddr,
> CPUPPCState *env = cs->env_ptr;
> uint32_t insn;
>
> + env->spr[SPR_DAR] = vaddr;
> +
> /* Restore state and reload the insn we executed, for filling in DSISR.
> */
> cpu_restore_state(cs, retaddr, true);
> insn = cpu_ldl_code(env, env->nip);
>