mbox

[kvm-unit-tests,GIT,PULL,00/14] s390x: new maintainer, refactor linker scripts, tests for misalignments, execute-type instructions and vSIE epdx

Message ID 20230331113028.621828-1-nrb@linux.ibm.com (mailing list archive)
State New, archived
Headers show

Pull-request

https://gitlab.com/Nico-Boehr/kvm-unit-tests.git

Message

Nico Boehr March 31, 2023, 11:30 a.m. UTC
Hi Paolo and/or Thomas,

here comes the first pull request from me. :)

Changes in this pull request:

* Marc contributed a series with a few fixes. Most importantly, it generates
  linker scripts for s390x with the assembler, permitting the use of defines in
  linker scripts.
  It is worth noting that it also touches lib/linux/const.h to check for
  __ASSEMBLY__ and __ASSEMBLER__.
* Nina contributed quite a few tests for misalignments in various instructions.
  As well as tests for execute-type instructions. Note that a few of her tests
  will require recent QEMUs under TCG. Upstream fixes are available [1, 2].
* Thomas contributed a test for vSIE on s390x, where the g3 clock might
  sometimes we wrong after reboot. A kernel patch is required[3].
* And, finally, the patch where I get the honor to work as maintainer.

MERGE: https://gitlab.com/kvm-unit-tests/kvm-unit-tests/-/merge_requests/42

PIPELINE: https://gitlab.com/Nico-Boehr/kvm-unit-tests/-/pipelines/824153766

PULL: https://gitlab.com/Nico-Boehr/kvm-unit-tests.git s390x-2023-03

[1] https://lists.gnu.org/archive/html/qemu-devel/2023-03/msg04860.html
[2] https://lists.gnu.org/archive/html/qemu-devel/2023-03/msg04896.html
[3] https://lore.kernel.org/kvm/20221123090833.292938-1-thuth@redhat.com/

The following changes since commit 42ff0bbcaa6863c755f9e333499448a1ea6e7239:

  Add a proper LICENSE file (2023-03-31 10:45:22 +0200)

are available in the Git repository at:

  https://gitlab.com/Nico-Boehr/kvm-unit-tests.git 

for you to fetch changes up to 51bd40c5044bd2636346333be6cb2dffd45289f1:

  s390x: sie: Test whether the epoch extension field is working as expected (2023-03-31 12:06:54 +0200)

----------------------------------------------------------------

Janosch Frank (1):
  MAINTAINERS: Add Nico as s390x Maintainer and make Thomas reviewer

Marc Hartmayer (7):
  .gitignore: ignore `s390x/comm.key` file
  s390x/Makefile: simplify `%.hdr` target rules
  s390x/Makefile: fix `*.gbin` target dependencies
  s390x/Makefile: refactor CPPFLAGS
  s390x: use preprocessor for linker script generation
  s390x: define a macro for the stack frame size
  lib/linux/const.h: test for `__ASSEMBLER__` as well

Nina Schoetterl-Glausch (5):
  s390x/spec_ex: Use PSW macro
  s390x/spec_ex: Add test introducing odd address into PSW
  s390x/spec_ex: Add test of EXECUTE with odd target address
  s390x: Add tests for execute-type instructions
  s390x: spec_ex: Add test for misaligned load

Thomas Huth (1):
  s390x: sie: Test whether the epoch extension field is working as
    expected

 MAINTAINERS                                 |   3 +-
 s390x/Makefile                              |  28 +--
 lib/linux/const.h                           |   2 +-
 lib/s390x/asm-offsets.c                     |   1 +
 s390x/cstart64.S                            |   2 +-
 s390x/{flat.lds => flat.lds.S}              |   4 +-
 s390x/macros.S                              |   4 +-
 s390x/snippets/asm/{flat.lds => flat.lds.S} |   0
 s390x/snippets/c/{flat.lds => flat.lds.S}   |   6 +-
 s390x/ex.c                                  | 188 ++++++++++++++++++++
 s390x/gs.c                                  |  38 ++--
 s390x/sie.c                                 |  28 +++
 s390x/spec_ex.c                             | 106 +++++++++--
 s390x/unittests.cfg                         |   3 +
 .gitignore                                  |   2 +
 .gitlab-ci.yml                              |   1 +
 16 files changed, 370 insertions(+), 46 deletions(-)
 rename s390x/{flat.lds => flat.lds.S} (93%)
 rename s390x/snippets/asm/{flat.lds => flat.lds.S} (100%)
 rename s390x/snippets/c/{flat.lds => flat.lds.S} (88%)
 create mode 100644 s390x/ex.c

Comments

Thomas Huth March 31, 2023, 1:17 p.m. UTC | #1
On 31/03/2023 13.30, Nico Boehr wrote:
> Hi Paolo and/or Thomas,
> 
> here comes the first pull request from me. :)

Thanks!

... I gave it a try, but I'm hitting a failure in the spec_ex test:

$ cat logs/spec_ex.log
timeout -k 1s --foreground 90s qemu-system-s390x -nodefaults -nographic -machine s390-ccw-virtio,accel=kvm -chardev stdio,id=con0 -device sclpconsole,chardev=con0 -kernel s390x/spec_ex.elf -smp 1 # -initrd /tmp/tmp.cxHP06rT1F
PASS: specification exception: psw_bit_12_is_1: Program interrupt: expected(6) == received(6)
PASS: specification exception: short_psw_bit_12_is_0: Program interrupt: expected(6) == received(6)
FAIL: specification exception: psw_odd_address: Expected exception due to invalid PSW
PASS: specification exception: odd_ex_target: did not perform ex with odd target
PASS: specification exception: odd_ex_target: Program interrupt: expected(6) == received(6)
PASS: specification exception: bad_alignment_lqp: Program interrupt: expected(6) == received(6)
PASS: specification exception: bad_alignment_lrl: Program interrupt: expected(6) == received(6)
PASS: specification exception: not_even: Program interrupt: expected(6) == received(6)
PASS: specification exception during transaction: odd_ex_target: Program interrupt: expected(518) == received(518)
PASS: specification exception during transaction: bad_alignment_lqp: Program interrupt: expected(518) == received(518)
PASS: specification exception during transaction: bad_alignment_lrl: Program interrupt: expected(518) == received(518)
PASS: specification exception during transaction: not_even: Program interrupt: expected(518) == received(518)
SUMMARY: 12 tests, 1 unexpected failures

EXIT: STATUS=3

I'm sure I'm missing something, I just cannot figure it out right
now (it's Friday afternoon...) - QEMU is the current version from
the master branch, so I thought that it should contain all the
recent fixes ... does this psw_odd_address test require a fix in
the kernel, too? (I'm currently running a RHEL9 kernel)

  Thomas
Nico Boehr March 31, 2023, 2:19 p.m. UTC | #2
Quoting Thomas Huth (2023-03-31 15:17:33)
> On 31/03/2023 13.30, Nico Boehr wrote:
> > Hi Paolo and/or Thomas,
> > 
> > here comes the first pull request from me. :)
> 
> Thanks!
> 
> ... I gave it a try, but I'm hitting a failure in the spec_ex test:
> 
> $ cat logs/spec_ex.log
> timeout -k 1s --foreground 90s qemu-system-s390x -nodefaults -nographic -machine s390-ccw-virtio,accel=kvm -chardev stdio,id=con0 -device sclpconsole,chardev=con0 -kernel s390x/spec_ex.elf -smp 1 # -initrd /tmp/tmp.cxHP06rT1F
> PASS: specification exception: psw_bit_12_is_1: Program interrupt: expected(6) == received(6)
> PASS: specification exception: short_psw_bit_12_is_0: Program interrupt: expected(6) == received(6)
> FAIL: specification exception: psw_odd_address: Expected exception due to invalid PSW
> PASS: specification exception: odd_ex_target: did not perform ex with odd target
> PASS: specification exception: odd_ex_target: Program interrupt: expected(6) == received(6)
> PASS: specification exception: bad_alignment_lqp: Program interrupt: expected(6) == received(6)
> PASS: specification exception: bad_alignment_lrl: Program interrupt: expected(6) == received(6)
> PASS: specification exception: not_even: Program interrupt: expected(6) == received(6)
> PASS: specification exception during transaction: odd_ex_target: Program interrupt: expected(518) == received(518)
> PASS: specification exception during transaction: bad_alignment_lqp: Program interrupt: expected(518) == received(518)
> PASS: specification exception during transaction: bad_alignment_lrl: Program interrupt: expected(518) == received(518)
> PASS: specification exception during transaction: not_even: Program interrupt: expected(518) == received(518)
> SUMMARY: 12 tests, 1 unexpected failures
> 
> EXIT: STATUS=3
> 
> I'm sure I'm missing something, I just cannot figure it out right
> now (it's Friday afternoon...) - QEMU is the current version from
> the master branch, so I thought that it should contain all the
> recent fixes ... does this psw_odd_address test require a fix in
> the kernel, too? (I'm currently running a RHEL9 kernel)

Thomas, I cannot reproduce this with a QEMU master and 6.3-rc4, so you might be right that some kernel fix is required.

Since the weekend is calling now, I will take a look at this on Monday.