Skip to content

target/s390x: Implement Early Exception Recognition

Ilya Leoshkevich qemu-devel 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 2 repliesIn review
  2. v12 patches 4 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3target/s390x: Fix LPSWtarget/s390x/tcg/translate.c+12 -101 reply
2/3target/s390x: Implement Early Exception Recognitiontarget/s390x/cpu.c target/s390x/cpu.h target/s390x/tcg/excp_helper.c +1 more+45 -11 reply
3/3tests/tcg/s390x: Add PSW modification teststests/tcg/s390x/Makefile.softmmu-target tests/tcg/s390x/exrl-ssm-early.S tests/tcg/s390x/lpsw.S +3 more+204 -00 replies

Reviews trailers per patch

2 of 3 patches have a Reviewed-by or Acked-by.

PatchDavid Hildenbrand
1/3R-b
2/3R-b
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/3] target/s390x: Implement Early Exception Recognition

v1: https://lists.gnu.org/archive/html/qemu-devel/2023-03/msg04372.html
v1 -> v2: Fix SSM and STOSM (Nina).
Fix LPSW (Nina).
Check bits 12 and 24 (Nina).
Improve the commit message (Nina).
Improve naming (David).

Hi,

Currently loading bad PSW flags does not lead to an exception, which is not correct. This series fixes this by implementing what PoP calls "Early Exception Recognition". Since it applies to both loading PSW with LPSW/LPSWE and to interrupt handling, s390_cpu_set_psw() looks like the right place for it to be in. SSM and STOSM need special handling, which is implemented inline.

Patch 1 fixes the LPSW instruction (which is related), patch 2 implements Early Exception Recognition, patch 3 adds a number of tests.

Best regards,
Ilya

Ilya Leoshkevich (3):
target/s390x: Fix LPSW
target/s390x: Implement Early Exception Recognition tests/tcg/s390x: Add PSW modification tests

 target/s390x/cpu.c                      | 26 +++++++++++++++
 target/s390x/cpu.h                      |  1 +
 target/s390x/tcg/excp_helper.c          |  3 +-
 target/s390x/tcg/translate.c            | 38 ++++++++++++++++------
 tests/tcg/s390x/Makefile.softmmu-target |  5 +++
 tests/tcg/s390x/exrl-ssm-early.S        | 43 +++++++++++++++++++++++++
 tests/tcg/s390x/lpsw.S                  | 36 +++++++++++++++++++++
 tests/tcg/s390x/lpswe-early.S           | 38 ++++++++++++++++++++++
 tests/tcg/s390x/ssm-early.S             | 41 +++++++++++++++++++++++
 tests/tcg/s390x/stosm-early.S           | 41 +++++++++++++++++++++++
 10 files changed, 261 insertions(+), 11 deletions(-)
 create mode 100644 tests/tcg/s390x/exrl-ssm-early.S
 create mode 100644 tests/tcg/s390x/lpsw.S
 create mode 100644 tests/tcg/s390x/lpswe-early.S
 create mode 100644 tests/tcg/s390x/ssm-early.S
 create mode 100644 tests/tcg/s390x/stosm-early.S
Signature · 1 line
2.39.2