[PATCH v2 0/2] Hexagon: fix signal context save & restore bug

Mukilan Thiyagarajan posted 2 patches 2 years, 8 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20221229092006.10709-1-quic._5Fmthiyaga@quicinc.com
Maintainers: Taylor Simpson <tsimpson@quicinc.com>, Laurent Vivier <laurent@vivier.eu>
linux-user/hexagon/signal.c        | 17 +++---
target/hexagon/cpu.c               |  6 +--
target/hexagon/genptr.c            | 12 ++---
target/hexagon/hex_regs.h          |  2 +-
tests/tcg/hexagon/Makefile.target  |  1 +
tests/tcg/hexagon/signal_context.c | 84 ++++++++++++++++++++++++++++++
6 files changed, 106 insertions(+), 16 deletions(-)
create mode 100644 tests/tcg/hexagon/signal_context.c
[PATCH v2 0/2] Hexagon: fix signal context save & restore bug
Posted by Mukilan Thiyagarajan 2 years, 8 months ago
This patchset is to fix the issue discovered in this thread
when hexagon toolchain was upgraded to a newer version.

https://lists.gnu.org/archive/html/qemu-devel/2021-11/msg01102.html

Investigation revealed that the bug was not in the
toolchain as suspected in the above thread, but in the
hexagon specific logic in linux-user for saving & restoring
thread context during signal delivery.

The first patch contains the fix for the issue along with a
test case and the second patch contains the change to rename
the enum for HEX_REG_P3_0 register, to provide some warning
to new code that it is an aliased version of the
individual predicate registers.

- Mukilan

*** Changes in v2 ***
Addressed the following review comments:
1) Fixed year in copyright line of signal_context.c
2) Moved variable decls to top of function in signal_context.c
3) Added PASS/FAIL output to signal_context.c test case

Mukilan Thiyagarajan (2):
  linux-user/hexagon: fix signal context save & restore
  target/hexagon: rename aliased register HEX_REG_P3_0

 linux-user/hexagon/signal.c        | 17 +++---
 target/hexagon/cpu.c               |  6 +--
 target/hexagon/genptr.c            | 12 ++---
 target/hexagon/hex_regs.h          |  2 +-
 tests/tcg/hexagon/Makefile.target  |  1 +
 tests/tcg/hexagon/signal_context.c | 84 ++++++++++++++++++++++++++++++
 6 files changed, 106 insertions(+), 16 deletions(-)
 create mode 100644 tests/tcg/hexagon/signal_context.c

-- 
2.17.1