qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] 54ba21: target/s390x: Fix SIGILL and SIGFPE p


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] 54ba21: target/s390x: Fix SIGILL and SIGFPE psw.addr repor...
Date: Wed, 04 Aug 2021 01:27:20 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 54ba2161d8c40235d7b486d68ac3803ae0818f43
      
https://github.com/qemu/qemu/commit/54ba2161d8c40235d7b486d68ac3803ae0818f43
  Author: Ilya Leoshkevich <iii@linux.ibm.com>
  Date:   2021-08-03 (Tue, 03 Aug 2021)

  Changed paths:
    M linux-user/s390x/cpu_loop.c

  Log Message:
  -----------
  target/s390x: Fix SIGILL and SIGFPE psw.addr reporting

For SIGILL, SIGFPE and SIGTRAP the PSW must point after the
instruction, and at the instruction for other signals. Currently under
qemu-user for SIGFILL and SIGFPE it points at the instruction.

Fix by advancing psw.addr for these signals.

Co-developed-by: Ulrich Weigand <ulrich.weigand@de.ibm.com>
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Buglink: https://gitlab.com/qemu-project/qemu/-/issues/319
Message-Id: <20210705210434.45824-2-iii@linux.ibm.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>


  Commit: ccb5f2708fa02a601833987dacbbc3b47d5b720c
      
https://github.com/qemu/qemu/commit/ccb5f2708fa02a601833987dacbbc3b47d5b720c
  Author: Jonathan Albrecht <jonathan.albrecht@linux.vnet.ibm.com>
  Date:   2021-08-03 (Tue, 03 Aug 2021)

  Changed paths:
    M linux-user/s390x/cpu_loop.c

  Log Message:
  -----------
  linux-user/s390x: signal with SIGFPE on compare-and-trap

Currently when a compare-and-trap instruction is executed, qemu will
always raise a SIGILL signal. On real hardware, a SIGFPE is raised.

Change the PGM_DATA case in cpu_loop to follow the behavior in
linux kernel /arch/s390/kernel/traps.c.
 * Only raise SIGILL if DXC == 0
 * If DXC matches a non-simulated IEEE exception, raise SIGFPE with
   correct si_code
 * Raise SIGFPE with si_code == 0 for everything else

When applied on 20210705210434.45824-2-iii@linux.ibm.com, this fixes
crashes in the java jdk such as the linked bug.

Signed-off-by: Jonathan Albrecht <jonathan.albrecht@linux.vnet.ibm.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Buglink: https://bugs.launchpad.net/qemu/+bug/1920913
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/319
Message-Id: <20210709160459.4962-2-jonathan.albrecht@linux.vnet.ibm.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>


  Commit: 50e36dd61652a4a4f2af245655ed3ca08ef0a3ed
      
https://github.com/qemu/qemu/commit/50e36dd61652a4a4f2af245655ed3ca08ef0a3ed
  Author: Jonathan Albrecht <jonathan.albrecht@linux.vnet.ibm.com>
  Date:   2021-08-03 (Tue, 03 Aug 2021)

  Changed paths:
    M tests/tcg/s390x/Makefile.target
    A tests/tcg/s390x/trap.c

  Log Message:
  -----------
  tests/tcg: Test that compare-and-trap raises SIGFPE

Signed-off-by: Jonathan Albrecht <jonathan.albrecht@linux.vnet.ibm.com>
Message-Id: <20210709160459.4962-3-jonathan.albrecht@linux.vnet.ibm.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>


  Commit: cb2f4b8750b7e1c954570d19b104d4fdbeb8739a
      
https://github.com/qemu/qemu/commit/cb2f4b8750b7e1c954570d19b104d4fdbeb8739a
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2021-08-03 (Tue, 03 Aug 2021)

  Changed paths:
    M linux-user/s390x/cpu_loop.c
    M tests/tcg/s390x/Makefile.target
    A tests/tcg/s390x/trap.c

  Log Message:
  -----------
  Merge remote-tracking branch 
'remotes/thuth-gitlab/tags/pull-request-2021-08-03' into staging

* Fixes for SIGILL and SIGFPE of the s390x linux-user target

# gpg: Signature made Tue 03 Aug 2021 14:30:54 BST
# gpg:                using RSA key 27B88847EEE0250118F3EAB92ED9D774FE702DB5
# gpg:                issuer "thuth@redhat.com"
# gpg: Good signature from "Thomas Huth <th.huth@gmx.de>" [full]
# gpg:                 aka "Thomas Huth <thuth@redhat.com>" [full]
# gpg:                 aka "Thomas Huth <huth@tuxfamily.org>" [full]
# gpg:                 aka "Thomas Huth <th.huth@posteo.de>" [unknown]
# Primary key fingerprint: 27B8 8847 EEE0 2501 18F3  EAB9 2ED9 D774 FE70 2DB5

* remotes/thuth-gitlab/tags/pull-request-2021-08-03:
  tests/tcg: Test that compare-and-trap raises SIGFPE
  linux-user/s390x: signal with SIGFPE on compare-and-trap
  target/s390x: Fix SIGILL and SIGFPE psw.addr reporting

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


Compare: https://github.com/qemu/qemu/compare/2cd9e2bd093a...cb2f4b8750b7



reply via email to

[Prev in Thread] Current Thread [Next in Thread]