[PATCH v3 0/3] linux-user/ppc: Deliver SIGTRAP on tw[i]/td[i]

matheus.ferst@eldorado.org.br posted 3 patches 2 years, 3 months ago
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20220113170456.1796911-1-matheus.ferst@eldorado.org.br
Maintainers: Greg Kurz <groug@kaod.org>, David Gibson <david@gibson.dropbear.id.au>, Laurent Vivier <laurent@vivier.eu>, "Cédric Le Goater" <clg@kaod.org>, Daniel Henrique Barboza <danielhb413@gmail.com>
linux-user/ppc/cpu_loop.c                   | 3 ++-
target/ppc/translate.c                      | 8 ++++----
tests/tcg/ppc64le/signal_save_restore_xer.c | 8 ++++----
3 files changed, 10 insertions(+), 9 deletions(-)
[PATCH v3 0/3] linux-user/ppc: Deliver SIGTRAP on tw[i]/td[i]
Posted by matheus.ferst@eldorado.org.br 2 years, 3 months ago
From: Matheus Ferst <matheus.ferst@eldorado.org.br>

In the review of 66c6b40aba1, Richard Henderson suggested[1] using
"trap" instead of ".long 0x0" to generate the signal to test XER
save/restore behavior. However, linux-user aborts when a trap
exception is raised, so we kept the patch with SIGILL.

This patch series is a follow-up to remove the cpu_abort call, deliver
SIGTRAP instead (using TRAP_BRKPT as si_code), and apply the suggestion
to the signal_save_restore_xer test.

The first patch removes the "qemu: fatal: Tried to call a TRAP" reported
in issue #588[2]. The third patch is an RFC to address the other logged
messages of "Unknown privilege violation (03)".

[1] https://lists.gnu.org/archive/html/qemu-ppc/2021-10/msg00143.html
[2] https://gitlab.com/qemu-project/qemu/-/issues/588

v3:
 - RFC to address the "Unknown privilege violation (03)" in #588.

v2:
 - Based-on rth's patch to use force_sig_fault and avoid merge conflicts

Matheus Ferst (3):
  linux-user/ppc: deliver SIGTRAP on POWERPC_EXCP_TRAP
  tests/tcg/ppc64le: change signal_save_restore_xer to use SIGTRAP
  target/ppc: Fix gen_priv_exception error value in mfspr/mtspr

 linux-user/ppc/cpu_loop.c                   | 3 ++-
 target/ppc/translate.c                      | 8 ++++----
 tests/tcg/ppc64le/signal_save_restore_xer.c | 8 ++++----
 3 files changed, 10 insertions(+), 9 deletions(-)

-- 
2.25.1


Re: [PATCH v3 0/3] linux-user/ppc: Deliver SIGTRAP on tw[i]/td[i]
Posted by Matheus K. Ferst 2 years, 2 months ago
Ping.

All patches reviewed and the series still applies to master with no 
conflicts.

On 13/01/2022 14:04, matheus.ferst@eldorado.org.br wrote:
> From: Matheus Ferst <matheus.ferst@eldorado.org.br>
> 
> In the review of 66c6b40aba1, Richard Henderson suggested[1] using
> "trap" instead of ".long 0x0" to generate the signal to test XER
> save/restore behavior. However, linux-user aborts when a trap
> exception is raised, so we kept the patch with SIGILL.
> 
> This patch series is a follow-up to remove the cpu_abort call, deliver
> SIGTRAP instead (using TRAP_BRKPT as si_code), and apply the suggestion
> to the signal_save_restore_xer test.
> 
> The first patch removes the "qemu: fatal: Tried to call a TRAP" reported
> in issue #588[2]. The third patch is an RFC to address the other logged
> messages of "Unknown privilege violation (03)".
> 
> [1] https://lists.gnu.org/archive/html/qemu-ppc/2021-10/msg00143.html
> [2] https://gitlab.com/qemu-project/qemu/-/issues/588
> 
> v3:
>   - RFC to address the "Unknown privilege violation (03)" in #588.
> 
> v2:
>   - Based-on rth's patch to use force_sig_fault and avoid merge conflicts
> 
> Matheus Ferst (3):
>    linux-user/ppc: deliver SIGTRAP on POWERPC_EXCP_TRAP
>    tests/tcg/ppc64le: change signal_save_restore_xer to use SIGTRAP
>    target/ppc: Fix gen_priv_exception error value in mfspr/mtspr
> 
>   linux-user/ppc/cpu_loop.c                   | 3 ++-
>   target/ppc/translate.c                      | 8 ++++----
>   tests/tcg/ppc64le/signal_save_restore_xer.c | 8 ++++----
>   3 files changed, 10 insertions(+), 9 deletions(-)
>

Re: [PATCH v3 0/3] linux-user/ppc: Deliver SIGTRAP on tw[i]/td[i]
Posted by Matheus K. Ferst 2 years, 2 months ago
Ping.

The based-on series is already on master, only patch 3 is missing review.

On 13/01/2022 14:04, matheus.ferst@eldorado.org.br wrote:
> From: Matheus Ferst <matheus.ferst@eldorado.org.br>
> 
> In the review of 66c6b40aba1, Richard Henderson suggested[1] using
> "trap" instead of ".long 0x0" to generate the signal to test XER
> save/restore behavior. However, linux-user aborts when a trap
> exception is raised, so we kept the patch with SIGILL.
> 
> This patch series is a follow-up to remove the cpu_abort call, deliver
> SIGTRAP instead (using TRAP_BRKPT as si_code), and apply the suggestion
> to the signal_save_restore_xer test.
> 
> The first patch removes the "qemu: fatal: Tried to call a TRAP" reported
> in issue #588[2]. The third patch is an RFC to address the other logged
> messages of "Unknown privilege violation (03)".
> 
> [1] https://lists.gnu.org/archive/html/qemu-ppc/2021-10/msg00143.html
> [2] https://gitlab.com/qemu-project/qemu/-/issues/588
> 
> v3:
>   - RFC to address the "Unknown privilege violation (03)" in #588.
> 
> v2:
>   - Based-on rth's patch to use force_sig_fault and avoid merge conflicts
> 
> Matheus Ferst (3):
>    linux-user/ppc: deliver SIGTRAP on POWERPC_EXCP_TRAP
>    tests/tcg/ppc64le: change signal_save_restore_xer to use SIGTRAP
>    target/ppc: Fix gen_priv_exception error value in mfspr/mtspr
> 
>   linux-user/ppc/cpu_loop.c                   | 3 ++-
>   target/ppc/translate.c                      | 8 ++++----
>   tests/tcg/ppc64le/signal_save_restore_xer.c | 8 ++++----
>   3 files changed, 10 insertions(+), 9 deletions(-)
>