* [PULL 0/3] Linux user patches
@ 2026-07-28 9:16 Helge Deller
2026-07-28 15:31 ` Stefan Hajnoczi
0 siblings, 1 reply; 9+ messages in thread
From: Helge Deller @ 2026-07-28 9:16 UTC (permalink / raw)
To: qemu-devel, Stefan Hajnoczi
Cc: Yoshinori Sato, Cédric Le Goater, Helge Deller,
Laurent Vivier, Matt Turner, Pierrick Bouvier
From: Helge Deller <deller@gmx.de>
The following changes since commit 300438ffbb8d9430cac2fcc15cba6f482b2c0587:
Merge tag 'pull-trivial-patches' of https://gitlab.com/mjt0k/qemu into staging (2026-07-24 09:13:49 -0400)
are available in the Git repository at:
https://github.com/hdeller/qemu-hppa.git tags/linux-user-pull-request
for you to fetch changes up to db3abd36e4c7c2a72e00e5806cf4c47f5aa5c491:
linux-user/sh4: allow full 32-bit address space (2026-07-28 11:12:37 +0200)
----------------------------------------------------------------
linux-user patches
Enable fsmount() syscalls, fix build with Linux 7.2 kernel headers and
allow full 32-bit address space on sh4.
----------------------------------------------------------------
Cédric Le Goater (1):
linux-user: Guard local FUTEX_CMD_MASK definition
Laurent Vivier (1):
linux-user/sh4: allow full 32-bit address space
Matt Turner (1):
linux-user: fix guards for the fsmount(2) syscall series
linux-user/sh4/target_mman.h | 2 +-
linux-user/strace.c | 2 +-
linux-user/strace.list | 2 +-
linux-user/syscall.c | 4 ++--
linux-user/syscall_defs.h | 2 ++
target/sh4/cpu-param.h | 8 +++-----
6 files changed, 10 insertions(+), 10 deletions(-)
--
2.54.0
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PULL 0/3] Linux user patches
2026-07-28 9:16 Helge Deller
@ 2026-07-28 15:31 ` Stefan Hajnoczi
0 siblings, 0 replies; 9+ messages in thread
From: Stefan Hajnoczi @ 2026-07-28 15:31 UTC (permalink / raw)
To: Helge Deller
Cc: qemu-devel, Stefan Hajnoczi, Yoshinori Sato,
Cédric Le Goater, Helge Deller, Laurent Vivier, Matt Turner,
Pierrick Bouvier
[-- Attachment #1: Type: text/plain, Size: 116 bytes --]
Applied, thanks.
Please update the changelog at https://wiki.qemu.org/ChangeLog/11.1 for any user-visible changes.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PULL 0/3] Linux user patches
@ 2026-07-29 20:58 Helge Deller
2026-07-30 19:13 ` Stefan Hajnoczi
0 siblings, 1 reply; 9+ messages in thread
From: Helge Deller @ 2026-07-29 20:58 UTC (permalink / raw)
To: qemu-devel, Stefan Hajnoczi
Cc: Helge Deller, Pierrick Bouvier, Laurent Vivier
From: Helge Deller <deller@gmx.de>
The following changes since commit de5eb7c4dd3ef5688b14007134eb11ff4973580c:
Merge tag 'hw-misc-20260728' of https://github.com/philmd/qemu into staging (2026-07-28 10:04:08 -0400)
are available in the Git repository at:
https://github.com/hdeller/qemu-hppa.git tags/linux-user-pull-request
for you to fetch changes up to 8d0ac5933aa3476283c14680f165727268103fcd:
linux-user/aarch64: Fix SHADOW_STACK_SET_TOKEN (2026-07-29 22:56:12 +0200)
----------------------------------------------------------------
linux-user patches
Three linux-user patches, one aarch64 shadow stack fix
and two fixes for members of the target_msqid_ds struct.
----------------------------------------------------------------
Helge Deller (1):
linux-user: Fix msqid_ds struct wrt 32-bit big endian architectures
Richard Henderson (1):
linux-user/aarch64: Fix SHADOW_STACK_SET_TOKEN
no92 (1):
linux-user: fix incorrect msg_l[sr]pid members of target_msqid_ds
linux-user/syscall.c | 45 ++++++++++++++++++++------------------------
1 file changed, 20 insertions(+), 25 deletions(-)
--
2.54.0
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PULL 0/3] Linux user patches
2026-07-29 20:58 Helge Deller
@ 2026-07-30 19:13 ` Stefan Hajnoczi
0 siblings, 0 replies; 9+ messages in thread
From: Stefan Hajnoczi @ 2026-07-30 19:13 UTC (permalink / raw)
To: Helge Deller
Cc: qemu-devel, Stefan Hajnoczi, Helge Deller, Pierrick Bouvier,
Laurent Vivier
[-- Attachment #1: Type: text/plain, Size: 116 bytes --]
Applied, thanks.
Please update the changelog at https://wiki.qemu.org/ChangeLog/11.1 for any user-visible changes.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PULL 0/3] Linux user patches
@ 2026-08-07 13:26 Helge Deller
2026-08-07 13:26 ` [PULL 1/3] linux-user/sh4: Deliver SIGILL on invalid instruction Helge Deller
` (3 more replies)
0 siblings, 4 replies; 9+ messages in thread
From: Helge Deller @ 2026-08-07 13:26 UTC (permalink / raw)
To: qemu-devel, Stefan Hajnoczi
Cc: Pierrick Bouvier, deller, Laurent Vivier, Mikulas Patocka
From: Helge Deller <deller@gmx.de>
The following changes since commit 3e3ccab106f879b1512f8e0d51a827dd4de30e22:
Update version for v11.1.0-rc3 release (2026-08-04 15:36:08 -0400)
are available in the Git repository at:
https://github.com/hdeller/qemu-hppa.git tags/linux-user-pull-request
for you to fetch changes up to f7ad7b1f8c8148f39bc1f2c984bfc7b7c9c59041:
linux-user/sh4: Fix crashes on signal delivery in conditional delay slot (2026-08-07 15:13:36 +0200)
----------------------------------------------------------------
linux-user sh4 signal patches
Three important small signal handling fixes for the sh4 architecture from
Mikulas Patocka.
----------------------------------------------------------------
Mikulas Patocka (3):
linux-user/sh4: Deliver SIGILL on invalid instruction
linux-user/sh4: Initialize the FPSCR register on signal
linux-user/sh4: Fix crashes on signal delivery in conditional delay
slot
linux-user/sh4/cpu_loop.c | 7 +++++++
linux-user/sh4/signal.c | 6 +++++-
2 files changed, 12 insertions(+), 1 deletion(-)
--
2.54.0
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PULL 1/3] linux-user/sh4: Deliver SIGILL on invalid instruction
2026-08-07 13:26 [PULL 0/3] Linux user patches Helge Deller
@ 2026-08-07 13:26 ` Helge Deller
2026-08-07 13:26 ` [PULL 2/3] linux-user/sh4: Initialize the FPSCR register on signal Helge Deller
` (2 subsequent siblings)
3 siblings, 0 replies; 9+ messages in thread
From: Helge Deller @ 2026-08-07 13:26 UTC (permalink / raw)
To: qemu-devel, Stefan Hajnoczi
Cc: Pierrick Bouvier, deller, Laurent Vivier, Mikulas Patocka,
Yoshinori Sato, Richard Henderson
From: Mikulas Patocka <mpatocka@redhat.com>
On invalid instruction, deliver SIGILL rather than crashing the whole
process unconditionally.
Cc: qemu-stable@nongnu.org
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Reviewed-by: Yoshinori Sato <yoshinori.sato@nifty.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Helge Deller <deller@gmx.de>
---
linux-user/sh4/cpu_loop.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/linux-user/sh4/cpu_loop.c b/linux-user/sh4/cpu_loop.c
index ee2958d0d9..0815b9c9bf 100644
--- a/linux-user/sh4/cpu_loop.c
+++ b/linux-user/sh4/cpu_loop.c
@@ -64,6 +64,13 @@ void cpu_loop(CPUSH4State *env)
cpu_exec_step_atomic(cs);
arch_interrupt = false;
break;
+ case 0x180:
+ /* Illegal instruction */
+ /* fallthrough */
+ case 0x1a0:
+ /* Illegal instruction in delay slot */
+ force_sig_fault(TARGET_SIGILL, TARGET_ILL_ILLOPC, env->pc);
+ break;
default:
fprintf(stderr, "Unhandled trap: 0x%x\n", trapnr);
cpu_dump_state(cs, stderr, 0);
--
2.54.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PULL 2/3] linux-user/sh4: Initialize the FPSCR register on signal
2026-08-07 13:26 [PULL 0/3] Linux user patches Helge Deller
2026-08-07 13:26 ` [PULL 1/3] linux-user/sh4: Deliver SIGILL on invalid instruction Helge Deller
@ 2026-08-07 13:26 ` Helge Deller
2026-08-07 13:26 ` [PULL 3/3] linux-user/sh4: Fix crashes on signal delivery in conditional delay slot Helge Deller
2026-08-11 21:37 ` [PULL 0/3] Linux user patches Stefan Hajnoczi
3 siblings, 0 replies; 9+ messages in thread
From: Helge Deller @ 2026-08-07 13:26 UTC (permalink / raw)
To: qemu-devel, Stefan Hajnoczi
Cc: Pierrick Bouvier, deller, Laurent Vivier, Mikulas Patocka,
Yoshinori Sato
From: Mikulas Patocka <mpatocka@redhat.com>
On the SH4 architecture, the instructions that perform single precision
and double precision floating point operations are encoded in the same
way. The bit PR in the FPSCR register determines if the CPU performs
single or double operation.
According to the ABI, the PR bit must be set at function entry and
function exit.
GCC generates code that flips this bit as needed during function
execution. If we get a signal, we must set the PR bit, so that the signal
handler finds the bit in the expected state. Qemu lacked this logic, so
that if the signal interrupts single-precision floating point
calculation, the PR bit would be incorrectly clear at signal handler
entry. If the signal handler performed some floating-point calculation,
it would get incorrect result.
This patch fixes the bug, by initializing the FPSCR register at signal
entry. Note that we initialize the whole register, because the Linux
kernel initializes the whole register too.
Cc: qemu-stable@nongnu.org
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Reviewed-by: Yoshinori Sato <yoshinori.sato@nifty.com>
Signed-off-by: Helge Deller <deller@gmx.de>
---
linux-user/sh4/signal.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/linux-user/sh4/signal.c b/linux-user/sh4/signal.c
index 00290d6e40..7f246e750d 100644
--- a/linux-user/sh4/signal.c
+++ b/linux-user/sh4/signal.c
@@ -206,6 +206,8 @@ void setup_frame(int sig, struct target_sigaction *ka,
__put_user(set->sig[i + 1], &frame->extramask[i]);
}
+ regs->fpscr = FPSCR_PR;
+
/* Set up to return from userspace. If provided, use a stub
already in userspace. */
if (ka->sa_flags & TARGET_SA_RESTORER) {
@@ -258,6 +260,8 @@ void setup_rt_frame(int sig, struct target_sigaction *ka,
__put_user(set->sig[i], &frame->uc.tuc_sigmask.sig[i]);
}
+ regs->fpscr = FPSCR_PR;
+
/* Set up to return from userspace. If provided, use a stub
already in userspace. */
if (ka->sa_flags & TARGET_SA_RESTORER) {
--
2.54.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PULL 3/3] linux-user/sh4: Fix crashes on signal delivery in conditional delay slot
2026-08-07 13:26 [PULL 0/3] Linux user patches Helge Deller
2026-08-07 13:26 ` [PULL 1/3] linux-user/sh4: Deliver SIGILL on invalid instruction Helge Deller
2026-08-07 13:26 ` [PULL 2/3] linux-user/sh4: Initialize the FPSCR register on signal Helge Deller
@ 2026-08-07 13:26 ` Helge Deller
2026-08-11 21:37 ` [PULL 0/3] Linux user patches Stefan Hajnoczi
3 siblings, 0 replies; 9+ messages in thread
From: Helge Deller @ 2026-08-07 13:26 UTC (permalink / raw)
To: qemu-devel, Stefan Hajnoczi
Cc: Pierrick Bouvier, deller, Laurent Vivier, Mikulas Patocka,
Yoshinori Sato
From: Mikulas Patocka <mpatocka@redhat.com>
If we get a signal in the delay slot, we must roll-back the PC to the
jump instruction. This was already fixed by the commit 3b894b699c9a
("linux-user/sh4: Fix crashes on signal delivery"), however this fix
omits a test for TB_FLAG_DELAY_SLOT_COND. TB_FLAG_DELAY_SLOT_COND is set
by the conditional delayed branches bf/s and bt/s. Qemu did not roll-back
the PC in this case, resulting in incorrect program execution.
This patch fixes it.
Cc: qemu-stable@nongnu.org
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Reviewed-by: Yoshinori Sato <yoshinori.sato@nifty.com>
Signed-off-by: Helge Deller <deller@gmx.de>
---
linux-user/sh4/signal.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/linux-user/sh4/signal.c b/linux-user/sh4/signal.c
index 7f246e750d..047174ac8f 100644
--- a/linux-user/sh4/signal.c
+++ b/linux-user/sh4/signal.c
@@ -109,7 +109,7 @@ static void unwind_gusa(CPUSH4State *regs)
the SP, otherwise we would be pushing the signal context to
invalid memory. */
regs->gregs[15] = regs->gregs[1];
- } else if (regs->flags & TB_FLAG_DELAY_SLOT) {
+ } else if (regs->flags & (TB_FLAG_DELAY_SLOT | TB_FLAG_DELAY_SLOT_COND)) {
/* If we are in a delay slot, push the previous instruction. */
regs->pc -= 2;
}
--
2.54.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PULL 0/3] Linux user patches
2026-08-07 13:26 [PULL 0/3] Linux user patches Helge Deller
` (2 preceding siblings ...)
2026-08-07 13:26 ` [PULL 3/3] linux-user/sh4: Fix crashes on signal delivery in conditional delay slot Helge Deller
@ 2026-08-11 21:37 ` Stefan Hajnoczi
3 siblings, 0 replies; 9+ messages in thread
From: Stefan Hajnoczi @ 2026-08-11 21:37 UTC (permalink / raw)
To: Helge Deller
Cc: qemu-devel, Stefan Hajnoczi, Pierrick Bouvier, deller,
Laurent Vivier, Mikulas Patocka
[-- Attachment #1: Type: text/plain, Size: 116 bytes --]
Applied, thanks.
Please update the changelog at https://wiki.qemu.org/ChangeLog/11.2 for any user-visible changes.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2026-08-11 21:38 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-07 13:26 [PULL 0/3] Linux user patches Helge Deller
2026-08-07 13:26 ` [PULL 1/3] linux-user/sh4: Deliver SIGILL on invalid instruction Helge Deller
2026-08-07 13:26 ` [PULL 2/3] linux-user/sh4: Initialize the FPSCR register on signal Helge Deller
2026-08-07 13:26 ` [PULL 3/3] linux-user/sh4: Fix crashes on signal delivery in conditional delay slot Helge Deller
2026-08-11 21:37 ` [PULL 0/3] Linux user patches Stefan Hajnoczi
-- strict thread matches above, loose matches on Subject: below --
2026-07-29 20:58 Helge Deller
2026-07-30 19:13 ` Stefan Hajnoczi
2026-07-28 9:16 Helge Deller
2026-07-28 15:31 ` Stefan Hajnoczi
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.