Skip to content

qemu: experimental support for S390X #3319

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 18, 2025
Merged

Conversation

AkihiroSuda
Copy link
Member

Supporting S390X is useful for testing a program with big-endian.

@AkihiroSuda AkihiroSuda added this to the v1.1.0 milestone Mar 8, 2025
@AkihiroSuda AkihiroSuda force-pushed the s390x branch 2 times, most recently from 0fdafbd to ae8bbf8 Compare March 8, 2025 20:16
@jandubois
Copy link
Member

How do you run this? I tried l start --tty=false --arch s390x (on macOS 15.3.1 on M1) and get this error in ha.stderr.log:

{"level":"debug","msg":"qemu[stderr]: qemu-system-s390x: -netdev user,id=net0,net=192.168.5.0/24,dhcpstart=192.168.5.15,hostfwd=tcp:127.0.0.1:60022-:22: Could not set up host forwarding rule 'tcp:127.0.0.1:60022-:22'","time":"2025-03-08T22:29:56-08:00"}
{"level":"info","msg":"Driver stopped due to error: \"exit status 1\"","time":"2025-03-08T22:29:56-08:00"}

@afbjorklund
Copy link
Member

afbjorklund commented Mar 9, 2025

I know that there were some people fighting hard to keep both ppc64le and s390x in Kubernetes (and minikube), but most of the time it was either untested or (possibly) run only in emulation. So many wanted it to be removed, therefore.

ALL_ARCH = amd64 arm arm64 ppc64le s390x

Think I had some branch that was able to run them (that I since deleted), there were some tweaks that were needed to the startup parameters and what not. But it seems like there will be a rather narrow audience of these, similar to arm32?

@AkihiroSuda
Copy link
Member Author

How do you run this? I tried l start --tty=false --arch s390x (on macOS 15.3.1 on M1) and get this error in ha.stderr.log:

{"level":"debug","msg":"qemu[stderr]: qemu-system-s390x: -netdev user,id=net0,net=192.168.5.0/24,dhcpstart=192.168.5.15,hostfwd=tcp:127.0.0.1:60022-:22: Could not set up host forwarding rule 'tcp:127.0.0.1:60022-:22'","time":"2025-03-08T22:29:56-08:00"}
{"level":"info","msg":"Driver stopped due to error: \"exit status 1\"","time":"2025-03-08T22:29:56-08:00"}

It just works for me in that way, on macOS 15.3.1 with QEMU 9.2.2 on M4 Max.

Maybe something was occupying the port 60022 ?

Copy link
Member Author

@AkihiroSuda AkihiroSuda Mar 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

EL8, 9, and 10 do not seem to support virtio-net-pci on s390x ? 🤔

[   57.518703] cloud-init[967]: ci-info: +++++++++++++++++++++++Net device info++++++++++++++++++++++++                               
[   57.518703] cloud-init[967]: ci-info: +++++++++++++++++++++++Net device info++++++++++++++++++++++++                               
[   57.520356] cloud-init[967]: ci-info: +--------+------+-----------+-----------+-------+------------+                                                                                                                                                                     
[   57.520356] cloud-init[967]: ci-info: +--------+------+-----------+-----------+-------+------------+                               
[   57.521522] cloud-init[967]: ci-info: | Device |  Up  |  Address  |    Mask   | Scope | Hw-Address |                                                                                                                                                                     [   57.521522] cloud-init[967]: ci-info: | Device |  Up  |  Address  |    Mask   | Scope | Hw-Address |                                                                                                                                                                     [   57.522383] cloud-init[967]: ci-info: +--------+------+-----------+-----------+-------+------------+
[   57.522383] cloud-init[967]: ci-info: +--------+------+-----------+-----------+-------+------------+
[   57.523153] cloud-init[967]: ci-info: |   lo   | True | 127.0.0.1 | 255.0.0.0 |  host |     .      |                               
[   57.523153] cloud-init[967]: ci-info: |   lo   | True | 127.0.0.1 | 255.0.0.0 |  host |     .      |                               
[   57.524012] cloud-init[967]: ci-info: |   lo   | True |  ::1/128  |     .     |  host |     .      |                               
[   57.524012] cloud-init[967]: ci-info: |   lo   | True |  ::1/128  |     .     |  host |     .      |                               
[   57.524941] cloud-init[967]: ci-info: +--------+------+-----------+-----------+-------+------------+                               
[   57.524941] cloud-init[967]: ci-info: +--------+------+-----------+-----------+-------+------------+ 

Ubuntu 20.04 (kernel 5.4) still works, so this is a matter of the kernel config rather than the version.

Copy link
Member Author

@AkihiroSuda AkihiroSuda Mar 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated to use virtio-net-ccw.

The network per se now works, but SSH fails on EL 🤷‍♂️

$ ssh -F ~/.lima/centos-stream-10/ssh.config lima-centos-stream-10
[email protected]: Permission denied (publickey,gssapi-keyex,gssapi-with-mic).

jandubois
jandubois previously approved these changes Mar 10, 2025
Copy link
Member

@jandubois jandubois left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, LGTM

However, I only tested the default.yaml template.

Supporting S390X is useful for testing a program with big-endian.

Signed-off-by: Akihiro Suda <[email protected]>
@AkihiroSuda
Copy link
Member Author

Rebased

@AkihiroSuda AkihiroSuda requested a review from a team March 17, 2025 12:25
Copy link
Member

@afbjorklund afbjorklund left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure about making armv7l experimental*, but s390x changes look OK to me

* "unsupported" is fine, just not very new

@AkihiroSuda
Copy link
Member Author

I'm not sure about making armv7l experimental*, but s390x changes look OK to me

  • "unsupported" is fine, just not very new

armv7l has been already experimental: https://lima-vm.io/docs/releases/experimental/

@AkihiroSuda AkihiroSuda merged commit de50c9a into lima-vm:master Mar 18, 2025
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants