Skip to content

linux-user/aarch64: Fix SME/SME2 signal frame handling

Peter Maydell qemu-arm qemu-devel 2 versions In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 7 repliesIn review
  2. v13 patches 5 repliesSuperseded

Changes in v2 from the cover letter

* 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

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3linux-user/aarch64: Clear TPIDR2_EL0 when delivering signalslinux-user/aarch64/signal.c+5 -13 replies
2/3linux-user/aarch64: Support TPIDR2_MAGIC signal frame recordlinux-user/aarch64/signal.c+40 -22 replies
3/3linux-user/aarch64: Support ZT_MAGIC signal frame recordlinux-user/aarch64/signal.c+92 -12 replies

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchRichard HendersonPierrick Bouvier
1/3R-b R-b
2/3R-b R-b
3/3R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 for-10.1 0/3] linux-user/aarch64: Fix SME/SME2 signal frame handling

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(-)
Signature · 1 line
2.43.0