Bug 509562 - s390x: Define minimum required machine model
Summary: s390x: Define minimum required machine model
Status: RESOLVED FIXED
Alias: None
Product: valgrind
Classification: Developer tools
Component: general (other bugs)
Version First Reported In: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Florian Krohm
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-09-16 18:00 UTC by Florian Krohm
Modified: 2025-12-04 09:11 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Krohm 2025-09-16 18:00:27 UTC
README.s390 says z10 or later.  z10 was released in 2007.

The thing is that we're running out of bits for hardware capabilities.
Those are represented as an UInt which is 32-bit. We reserve 6 bit to encode the machine model
and 26 for the individual hwcaps. Out of those 25 have been used and most likely we need to
add a few for the latest machine. We can probably nuke LDISP. But it'll be tight.

Of course we can UInt --> ULong. An incompatible API change. Given that we have AFAICT only one
serious external user (pyvex) hell won't break loose. :)
But I rather prefer raising the min. machine model as that also allows to simplify the code quite
a bit. There are  plenty of if (host_has_hwcap_this_and_that) sprinkled around in the emitter and
other places which we could get rid of.

Andreas, I recall that we discussed that briefly when I was in Böblingen and seem to remember
that you were thinking of raising it to z196 (released in 2010).

Your call.
Comment 1 Florian Krohm 2025-09-23 09:53:01 UTC
At the same time we should also revisit the GCC version we're requiring.
README.s390 says 3.4  which was released 2004.
Comment 2 Florian Krohm 2025-11-07 21:08:47 UTC
Looked up end-of-service dates here: https://www.ibm.com/support/pages/lifecycle/

z196  12/2021
z13    12/2024

z196 is the 1st machine with the floating-point-extension facility.
z13 is the 1st machine with vector insns.

Choosing z196 as min. supported machine model frees up most HWCAPs bits. I would not consider an earlier machine
because the floating-point-extension facility is a pain.
Comment 3 Florian Krohm 2025-11-30 21:54:28 UTC
z196 is the min. required machine model.
Closing.
Comment 4 Florian Krohm 2025-12-04 09:11:32 UTC
FWIW 
lwn.net runs an article "The current state of Linux architecture support"  here https://lwn.net/Articles/1045363/
and reports for s390

Supported by: Debian, Ubuntu, and Fedora. 
...
The architecture has continued receiving updates, and Ubuntu requires the relatively recent z15 version, released in 2019. Debian has proposed updating to the same baseline, although the build infrastructure is actually composed entirely of z16 processors. Fedora theoretically supports anything after z13, although the project's documentation on the topic has not been updated in some time.