On Mon, 2021-06-21 at 10:14 -0400, Jonathan Albrecht wrote:
> 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 an IEEE exception, raise SIGFPE with correct si_code
>  * Raise SIGFPE with si_code == 0 for everything else
> 
> When applied on [email protected], this fixes
> crashes in the java jdk such as the linked bug.
> 
> Buglink: https://bugs.launchpad.net/qemu/+bug/1920913
> Resolves: https://gitlab.com/qemu-project/qemu/-/issues/319
> Signed-off-by: Jonathan Albrecht <
> [email protected]>
> ---
>  linux-user/s390x/cpu_loop.c | 19 ++++++++++---------
>  1 file changed, 10 insertions(+), 9 deletions(-)

I tried this on top of my SIGILL patch to run Maven, it worked without
issues.

Acked-by: Ilya Leoshkevich <[email protected]>
Tested-by: Ilya Leoshkevich <[email protected]>


Reply via email to