qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 for-10.1 0/3] linux-user/aarch64: Fix SME/SME2 signal frame handling
@ 2025-07-25 17:55 Peter Maydell
  2025-07-25 17:55 ` [PATCH v2 for-10.1 1/3] linux-user/aarch64: Clear TPIDR2_EL0 when delivering signals Peter Maydell
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Peter Maydell @ 2025-07-25 17:55 UTC (permalink / raw)
  To: qemu-arm, qemu-devel; +Cc: Richard Henderson

This patchset fixes some bugs in our SME-related signal frame
handling for linux-user:

 * we need to make the equivalent change to a recent kernel
   bugfix/ABI change: TPIDR2_EL0 should be cleared when delivering
   a signal
 * we forgot the TPIDR2_MAGIC signal frame record (which is necessary
   for SME v1)
 * we forgot the ZT_MAGIC signal frame record when implementing SME2

These bugs generally only surface when guest code attempts to
unwind an exception from inside a signal handler and SME is
involved. Discovered (and the fixes tested) by some new gcc
test cases which implement their part of the bugfix/ABI change
 https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=b5ffc8e75a8

v2: quick respin to address RTH's code review comments. I know
I only sent v1 earlier this evening but I wanted to get this
out of the door as I'm not going to be working the first half
of next week (back Thurs).

v1->v2:
 * patch 1: drop unnecessary if(), update comment
 * patch 2: do "has sme" check in better place, drop unneeded
   argument, return type
 * patch 3: do "has sme" check in better place, check the
   incoming SVCR value, not the old one

thanks
-- PMM


Peter Maydell (3):
  linux-user/aarch64: Clear TPIDR2_EL0 when delivering signals
  linux-user/aarch64: Support TPIDR2_MAGIC signal frame record
  linux-user/aarch64: Support ZT_MAGIC signal frame record

 linux-user/aarch64/signal.c | 139 +++++++++++++++++++++++++++++++++++-
 1 file changed, 136 insertions(+), 3 deletions(-)

-- 
2.43.0



^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2025-07-31  9:58 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-25 17:55 [PATCH v2 for-10.1 0/3] linux-user/aarch64: Fix SME/SME2 signal frame handling Peter Maydell
2025-07-25 17:55 ` [PATCH v2 for-10.1 1/3] linux-user/aarch64: Clear TPIDR2_EL0 when delivering signals Peter Maydell
2025-07-25 17:57   ` Pierrick Bouvier
2025-07-28 16:10   ` Michael Tokarev
2025-07-31  9:57     ` Peter Maydell
2025-07-25 17:55 ` [PATCH v2 for-10.1 2/3] linux-user/aarch64: Support TPIDR2_MAGIC signal frame record Peter Maydell
2025-07-25 17:57   ` Pierrick Bouvier
2025-07-25 20:20   ` Richard Henderson
2025-07-25 17:55 ` [PATCH v2 for-10.1 3/3] linux-user/aarch64: Support ZT_MAGIC " Peter Maydell
2025-07-25 17:59   ` Pierrick Bouvier
2025-07-25 20:23   ` Richard Henderson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).