Skip to content

s390x: Cleanup exception register save/restore and implement backtrace

Janosch Frank kvm linux-s390 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest7 patches 8 repliesIn review
  2. v28 patches 15 repliesSuperseded
  3. v18 patches 2 repliesSuperseded

Changes in v3 from the cover letter

* Squashed the STACK_FRAME_INT_SIZE definition patch
* Added a backchain store before we branch to the C pgm handler
* Switched to the *int*_t types from kernel style types
* Added comments

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7s390x: Fix fpc store address in RESTORE_REGS_STACKs390x/macros.S+1 -20 replies
2/7s390x: Fully commit to stack save area for exceptionslib/s390x/asm-offsets.c lib/s390x/asm/arch_def.h lib/s390x/asm/interrupt.h +3 more+85 -462 replies
3/7s390x: Introduce and use CALL_INT_HANDLER macros390x/cstart64.S s390x/macros.S+22 -231 reply
4/7s390x: Provide preliminary backtrace supportlib/s390x/stack.c s390x/Makefile s390x/macros.S+20 -62 replies
5/7s390x: Print more information on program exceptionslib/s390x/interrupt.c+29 -01 reply
6/7s390x: Move diag308_load_reset to stack savings390x/cpu.S+4 -21 reply
7/7s390x: Remove SAVE/RESTORE_STACK and lowcore fpc and fprs save areaslib/s390x/asm-offsets.c lib/s390x/asm/arch_def.h s390x/macros.S+1 -341 reply

Reviews trailers per patch

All 7 patches have a Reviewed-by or Acked-by.

PatchClaudio ImbrendaPierre MorelThomas Huth
1/7R-b R-b R-b
2/7R-b A-b
3/7R-b R-b
4/7R-b R-b
5/7R-b A-b R-b
6/7R-b R-b R-b
7/7R-b R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v3 thread

Cover letter [kvm-unit-tests PATCH v3 0/7] s390x: Cleanup exception register save/restore and implement backtrace

Having two sets of macros for saving and restoring registers on exceptions doesn't seem optimal to me. Therefore this patch set removes the old macros that use the lowcore as storage in favor of the stack using ones. At the same time we move over to generated offsets instead of subtracting from the stack piece by piece. Changes to the stack struct are easier that way.

Additionally let's add backtrace support and print the GRs on exception so we get a bit more information when something goes wrong.

v3:
* Squashed the STACK_FRAME_INT_SIZE definition patch
* Added a backchain store before we branch to the C pgm handler
* Switched to the *int*_t types from kernel style types
* Added comments

v2:
* Added full CR saving to fix diag308 test
* Added rev-bys

Janosch Frank (7):
s390x: Fix fpc store address in RESTORE_REGS_STACK
s390x: Fully commit to stack save area for exceptions
s390x: Introduce and use CALL_INT_HANDLER macro
s390x: Provide preliminary backtrace support
s390x: Print more information on program exceptions
s390x: Move diag308_load_reset to stack saving
s390x: Remove SAVE/RESTORE_STACK and lowcore fpc and fprs save areas

 lib/s390x/asm-offsets.c   | 17 ++++---
 lib/s390x/asm/arch_def.h  | 35 ++++++++++----
 lib/s390x/asm/interrupt.h |  4 +-
 lib/s390x/interrupt.c     | 43 +++++++++++++++---
 lib/s390x/stack.c         | 20 +++++---
 s390x/Makefile            |  1 +
 s390x/cpu.S               |  6 ++-
 s390x/cstart64.S          | 25 ++--------
 s390x/macros.S            | 96 ++++++++++++++++++++-------------------
 9 files changed, 148 insertions(+), 99 deletions(-)
Signature · 1 line
2.25.1