All of lore.kernel.org
 help / color / mirror / Atom feed
From: Helge Deller <deller@kernel.org>
To: Richard Henderson <richard.henderson@linaro.org>
Cc: qemu-devel@nongnu.org, Keith Monahan <keith@techtravels.org>,
	Helge Deller <deller@gmx.de>,
	"Kirill A . Korinsky" <kirill@korins.ky>
Subject: Re: [PULL v2 0/9] Hppa 715 2 patches
Date: Thu, 29 Oct 2026 19:18:17 +0100	[thread overview]
Message-ID: <auON6QwRA3wawcDO@carbonx1> (raw)
In-Reply-To: <61c1cd23-8097-4356-8797-f270a79e68df@linaro.org>

* Richard Henderson <richard.henderson@linaro.org>:
> On 10/28/26 14:06, Helge Deller wrote:
> > From: Helge Deller <deller@gmx.de>
> > 
> > The following changes since commit 73294d096cc591e122fde9e63db4739de6d84f2b:
> > 
> >    Merge tag 'qga-pull-2026-10-28' of https://github.com/kostyanf14/qemu into staging (2026-10-28 06:21:59 -0500)
> > 
> > are available in the Git repository at:
> > 
> >    https://github.com/hdeller/qemu-hppa.git tags/hppa-715-2-pull-request
> > 
> > for you to fetch changes up to 4d5bc20de77152cecb4acdf63afe0db761b2abcf:
> > 
> >    target/hppa: Update SeaBIOS-hppa to version 27 (2026-10-28 20:00:56 +0100)
> > 
> > ----------------------------------------------------------------
> > HPPA architecture patches for HP-UX 9 and 715 machine
> > 
> > A series of patches which allow to boot HP-UX 9.05 on the 715/64 machine.
> > Includes a graphics/artist fix, adjustment to 15 bits for protection IDs on
> > the 32-bit CPUs and various other parts which were missing up to now.
> > Included is also the FPU patche from Kirill A. Korinsky.
> 
> The new hppa-fpu-test fails on big-endian.

The patch below will fix the issue.
I'll include it in this patch series and resend.
Thanks!
Helge


From e0c80f0b9ca5792a91a0d14d09c3da05641d8402 Mon Sep 17 00:00:00 2001
From: Keith Monahan <keith@techtravels.org>
Date: Thu, 29 Oct 2026 17:02:33 +0100
Subject: [PATCH] target/hppa: Use 32-bit load of PSW in rsm and ssm

Since commit ebc9401a4067 ("target/hppa: Split PSW X and B into their
own field") env->psw is a uint32_t followed by psw_xb, but trans_rsm()
and trans_ssm() still read it with a 64-bit load.

On a big-endian host the low half of that load is psw_xb, so the value
passed to swap_system_mask() has none of the current system mask bits.
SSM and RSM therefore clear every PSW system mask bit except those named
in the instruction. For example, "ssm 2,r0" with PSW_Q set clears Q, and
the next interruption does not record IIR, ISR and IOR. This makes the
hppa-fpu-test dtlb-load case fail on s390x hosts.

Load only the 32-bit psw field.

Fixes: ebc9401a4067 ("target/hppa: Split PSW X and B into their own field")
Cc: qemu-stable@nongnu.org  # v9.1+
Signed-off-by: Keith Monahan <keith@techtravels.org>
Signed-off-by: Helge Deller <deller@gmx.de>

diff --git a/target/hppa/translate.c b/target/hppa/translate.c
index 41300c0dd7..46c0408846 100644
--- a/target/hppa/translate.c
+++ b/target/hppa/translate.c
@@ -2367,7 +2367,7 @@ static bool trans_rsm(DisasContext *ctx, arg_rsm *a)
     nullify_over(ctx);
 
     tmp = tcg_temp_new_i64();
-    tcg_gen_ld_i64(tmp, tcg_env, offsetof(CPUHPPAState, psw));
+    tcg_gen_ld32u_i64(tmp, tcg_env, offsetof(CPUHPPAState, psw));
     tcg_gen_andi_i64(tmp, tmp, ~a->i);
     gen_helper_swap_system_mask(tmp, tcg_env, tmp);
     save_gpr(ctx, a->t, tmp);
@@ -2387,7 +2387,7 @@ static bool trans_ssm(DisasContext *ctx, arg_ssm *a)
     nullify_over(ctx);
 
     tmp = tcg_temp_new_i64();
-    tcg_gen_ld_i64(tmp, tcg_env, offsetof(CPUHPPAState, psw));
+    tcg_gen_ld32u_i64(tmp, tcg_env, offsetof(CPUHPPAState, psw));
     tcg_gen_ori_i64(tmp, tmp, a->i);
     gen_helper_swap_system_mask(tmp, tcg_env, tmp);
     save_gpr(ctx, a->t, tmp);
> 
> 
> r~


      reply	other threads:[~2026-10-29 18:18 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-28 19:06 [PULL v2 0/9] Hppa 715 2 patches Helge Deller
2026-10-28 19:06 ` [PULL v2 1/9] target/hppa: restore lazy FPU context isolation Helge Deller
2026-10-28 19:06 ` [PULL v2 2/9] target/hppa: Use 15 bit protection IDs on PA1.1 CPUs Helge Deller
2026-10-28 19:06 ` [PULL v2 3/9] target/hppa: Only allow 8 BTLB entries for HP-UX 9.05 Helge Deller
2026-10-28 19:06 ` [PULL v2 4/9] target/hppa: Implement local broadcast I/O space Helge Deller
2026-10-28 19:06 ` [PULL v2 5/9] target/hppa: Preload I/O-space BTLB entries for LASI and the central bus Helge Deller
2026-10-28 19:06 ` [PULL v2 6/9] artist: Redraw screen on colormap changes Helge Deller
2026-10-28 19:06 ` [PULL v2 7/9] hw/misc/lasi: LASI Harmony Audio presence emulation Helge Deller
2026-10-28 19:07 ` [PULL v2 8/9] target/hppa: Map CPUs at same addresses as on physical machines Helge Deller
2026-10-28 19:07 ` [PULL v2 9/9] target/hppa: Update SeaBIOS-hppa to version 27 Helge Deller
2026-10-29 11:43 ` [PULL v2 0/9] Hppa 715 2 patches Richard Henderson
2026-10-29 18:18   ` Helge Deller [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=auON6QwRA3wawcDO@carbonx1 \
    --to=deller@kernel.org \
    --cc=deller@gmx.de \
    --cc=keith@techtravels.org \
    --cc=kirill@korins.ky \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.