]> git.ipfire.org Git - thirdparty/qemu.git/commit
target/hppa: Fix random 32-bit linux-user crashes
authorHelge Deller <deller@gmx.de>
Tue, 3 Sep 2024 16:21:28 +0000 (18:21 +0200)
committerMichael Tokarev <mjt@tls.msk.ru>
Wed, 25 Sep 2024 18:05:48 +0000 (21:05 +0300)
commiteb40b14740b9507c60805fccb723c3bd8903ab66
treefae1cac509f1635ad54697a41244047e4c0c81b0
parent03ee5e0c532d24a689b59495a36111a960420723
target/hppa: Fix random 32-bit linux-user crashes

The linux-user hppa target crashes randomly for me since commit
081a0ed188d8 ("target/hppa: Do not mask in copy_iaoq_entry").

That commit dropped the masking of the IAOQ addresses while copying them
from other registers and instead keeps them with all 64 bits up until
the full gva is formed with the help of hppa_form_gva_psw().

So, when running in linux-user mode on an emulated 64-bit CPU, we need
to mask to a 32-bit address space at the very end in hppa_form_gva_psw()
if the PSW-W flag isn't set (which is the case for linux-user on hppa).

Fixes: 081a0ed188d8 ("target/hppa: Do not mask in copy_iaoq_entry")
Cc: qemu-stable@nongnu.org # v9.1+
Signed-off-by: Helge Deller <deller@gmx.de>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
(cherry picked from commit d33d3adb573794903380e03e767e06470514cefe)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
target/hppa/cpu.h