[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
Re: [PATCH for-6.2 07/43] target/ppc: Set fault address in ppc_cpu_do_unaligned_access
Thu, 29 Jul 2021 08:05:58 -1000
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0
On 7/29/21 3:44 AM, Peter Maydell wrote:
On Thu, 29 Jul 2021 at 01:51, Richard Henderson
We ought to have been recording the virtual address for reporting
to the guest trap handler.
Signed-off-by: Richard Henderson <email@example.com>
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
@@ -1503,6 +1503,8 @@ void ppc_cpu_do_unaligned_access(CPUState *cs, vaddr
CPUPPCState *env = cs->env_ptr;
+ env->spr[SPR_DAR] = vaddr;
Is this the right SPR for all PPC variants? For instance the
kernel's code in arch/powerpc/kernel/exceptions-64e.S looks
in SPRN_DEAR, which is our SPR_BOOKE_DEAR or SPR_40x_DEAR.
I have no idea. I glanced through a handful of the mmu's, and looked at the current BookS
docs, but that's certainly not all.
I'll note that if we do need to set different regs for different mmus, we'll probably want
to standardize on this one for user-only, like we did for the user-only copy of