Message ID | 20220104210015.457468-2-matheus.ferst@eldorado.org.br (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | linux-user/ppc: Deliver SIGTRAP on tw[i]/td[i] | expand |
On 1/4/22 1:00 PM, matheus.ferst@eldorado.org.br wrote: > From: Matheus Ferst<matheus.ferst@eldorado.org.br> > > Handle POWERPC_EXCP_TRAP in cpu_loop to deliver SIGTRAP on tw[i]/td[i]. > The si_code comes from do_program_check in the kernel source file > arch/powerpc/kernel/traps.c > > Signed-off-by: Matheus Ferst<matheus.ferst@eldorado.org.br> > --- > linux-user/ppc/cpu_loop.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) Reviewed-by: Richard Henderson <richard.henderson@linaro.org> r~
On 1/4/22 22:00, matheus.ferst@eldorado.org.br wrote: > From: Matheus Ferst <matheus.ferst@eldorado.org.br> > > Handle POWERPC_EXCP_TRAP in cpu_loop to deliver SIGTRAP on tw[i]/td[i]. > The si_code comes from do_program_check in the kernel source file > arch/powerpc/kernel/traps.c > > Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br> > --- > linux-user/ppc/cpu_loop.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/linux-user/ppc/cpu_loop.c b/linux-user/ppc/cpu_loop.c > index 46e6ffd6d3..6c99feb19b 100644 > --- a/linux-user/ppc/cpu_loop.c > +++ b/linux-user/ppc/cpu_loop.c > @@ -188,7 +188,8 @@ void cpu_loop(CPUPPCState *env) > } > break; > case POWERPC_EXCP_TRAP: > - cpu_abort(cs, "Tried to call a TRAP\n"); > + si_signo = TARGET_SIGTRAP; > + si_code = TARGET_TRAP_BRKPT; These lack 'info.' Thanks, C. > break; > default: > /* Should not happen ! */ >
On 1/4/22 2:12 PM, Richard Henderson wrote: > On 1/4/22 1:00 PM, matheus.ferst@eldorado.org.br wrote: >> From: Matheus Ferst<matheus.ferst@eldorado.org.br> >> >> Handle POWERPC_EXCP_TRAP in cpu_loop to deliver SIGTRAP on tw[i]/td[i]. >> The si_code comes from do_program_check in the kernel source file >> arch/powerpc/kernel/traps.c >> >> Signed-off-by: Matheus Ferst<matheus.ferst@eldorado.org.br> >> --- >> linux-user/ppc/cpu_loop.c | 3 ++- >> 1 file changed, 2 insertions(+), 1 deletion(-) > > Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Resolves: https://gitlab.com/qemu-project/qemu/-/issues/588 r~
On 1/4/22 10:46 PM, Cédric Le Goater wrote: > On 1/4/22 22:00, matheus.ferst@eldorado.org.br wrote: >> From: Matheus Ferst <matheus.ferst@eldorado.org.br> >> >> Handle POWERPC_EXCP_TRAP in cpu_loop to deliver SIGTRAP on tw[i]/td[i]. >> The si_code comes from do_program_check in the kernel source file >> arch/powerpc/kernel/traps.c >> >> Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br> >> --- >> linux-user/ppc/cpu_loop.c | 3 ++- >> 1 file changed, 2 insertions(+), 1 deletion(-) >> >> diff --git a/linux-user/ppc/cpu_loop.c b/linux-user/ppc/cpu_loop.c >> index 46e6ffd6d3..6c99feb19b 100644 >> --- a/linux-user/ppc/cpu_loop.c >> +++ b/linux-user/ppc/cpu_loop.c >> @@ -188,7 +188,8 @@ void cpu_loop(CPUPPCState *env) >> } >> break; >> case POWERPC_EXCP_TRAP: >> - cpu_abort(cs, "Tried to call a TRAP\n"); >> + si_signo = TARGET_SIGTRAP; >> + si_code = TARGET_TRAP_BRKPT; > > These lack 'info.' You missed the Based-on in the cover-letter. r~
diff --git a/linux-user/ppc/cpu_loop.c b/linux-user/ppc/cpu_loop.c index 46e6ffd6d3..6c99feb19b 100644 --- a/linux-user/ppc/cpu_loop.c +++ b/linux-user/ppc/cpu_loop.c @@ -188,7 +188,8 @@ void cpu_loop(CPUPPCState *env) } break; case POWERPC_EXCP_TRAP: - cpu_abort(cs, "Tried to call a TRAP\n"); + si_signo = TARGET_SIGTRAP; + si_code = TARGET_TRAP_BRKPT; break; default: /* Should not happen ! */