-
Notifications
You must be signed in to change notification settings - Fork 704
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
Initial ppc64le Support #1057
Initial ppc64le Support #1057
Conversation
05491ff
to
b1b0141
Compare
Codecov Report
@@ Coverage Diff @@
## main #1057 +/- ##
==========================================
- Coverage 96.02% 96.01% -0.01%
==========================================
Files 133 133
Lines 19913 19913
Branches 199 199
==========================================
- Hits 19121 19120 -1
- Misses 754 756 +2
+ Partials 38 37 -1
... and 2 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
60f7563
to
443ef67
Compare
Updated the branch on top of current |
still won't build (ring) for ppc64le, current efforts at briansmith/ring#1057
443ef67
to
ba5b4b6
Compare
Updated the branch on top of current |
ba5b4b6
to
226f6f8
Compare
Rebased branch on top of current Please let us know if there is anything you need from us to aid you in moving this forward. |
226f6f8
to
f0ba073
Compare
Did you ever hear from @briansmith? |
@erichte-ibm @briansmith is there anything I could help to get this PR wrap up? |
f0ba073
to
0857717
Compare
We are still waiting to hear back, though we have be actively rebasing every week or so to try to keep this PR up to date.
Reviews and testing would be wonderful! So far, we have tested on little endian P8/P9/P10. We'd love to know your use case and platform so that we can work together on any issues you might find. |
I've added support for powerpc64le to nixpkgs.
Nixpkgs is sort of like Gentoo except that it isn't a distribution, and technically isn't even Linux-specific.
Gentoo can do the first two things, sort of, sometimes, with Gentoo Prefixes, but those only work for certain packages and are still sort of an experimental feature. Credit where credit is due, about half of the necessary effort was already in-tree as unfinished work; I did the other half to push it across the finish line. It successfully bootstraps now (if you apply all of my PRs, a few are not yet merged), building a complete Linux userspace from scratch. Nix does an outstanding job of bringing out the parallelism in this build process, which really shows off the throughput on my high-core-count Talos2 machines (those slick eDRAM cells you use don't hurt either; too bad GF never offered those to the rest of us). Unfortunately Rust's recursive hashing scheme ( You need to use the cargo I would really like to see this merged, even if it's hidden behind an off-by-default "yes I am crazy and I know what I'm doing" feature flag. We would expose it via an off-by-default flag with a similarly-scary name to our own users. |
Does adding a feature still require a
A feature would be somewhat redundant since we check the @briansmith Would adding an explicit feature for POWER support help get this reviewed/merged? |
I don't think features are covered by the This means that it is enough to add an extra (possibly redundant) I've had an extraordinarily hard time finding a formal specification of that file format (precisely how the checksum is computed, an exhaustive list of the fields, grammar for the |
Good to know!
With that knowledge, this makes sense to us at least. Hopefully we can hear back from the maintainer at some point if they agree this is an acceptable approach. |
I would like to have a rust desk build for ppc64le; it would be appreciated if someone reviewed this pull request if there is nothing wrong with it. |
I'm thankful for this work, it's enabled me to listen to Spotify with Psst on my Talos II. So far, so good! I've tested it with some other projects as well. |
Confirmed that this project builds with hid-io/hid-io-core@5394d79 using cargo patch stanza pointed to IBM/ring@3f8f04a (IBM/ring@ppc-0.16.20), but required reverting f06811a due to API usage in rcgen 0.9. Additionally, PR branch proposed builds with multiple other rust packages depending on ring using latest ring HEAD. Thank you to @erichte-ibm and the rest of the maintainers of the ppc64le ring port for unblocking so many packages with rcgen, webpki, and rustls dependencies! |
Note for other users requiring ppc64le support: IBM/ring also implements a patchset for ring-0.16.20 ( https://github.com/IBM/ring/tree/ppc-0.16.20 ) and generally tracks main on ( https://github.com/IBM/ring/tree/main-ppc ) but the branch with which this PR is concerned ( https://github.com/IBM/ring/tree/initial-ppc64le-support-pr ) is kept fully up to date and thus also tracks IBM/ring@main-ppc . |
Wondering if the core team could help review this PR. It would mean a world for the POWER community |
@erichte-ibm what's the progress of this PR please? AFAIK there is also another branch https://github.com/IBM/ring/commits/ppc-0.16.20 downstream. |
To be honest, I don't know. Last I checked, ppc64le support still relies on some perlasm to work in ring, albeit less than the original pull request. If that is a blocker for initial support, then we can't make much progress here. There have been some changes though since the last time I really looked at this PR though, so when I get the chance in the next few days, I'll dive into refreshing this PR branch. The other note was CI -- I've coincidentally be doing work on testing ppc64le code in Actions via docker/qemu, so if running tests / getting coverage is an issue as well, I can also look into adapting that here as well. As for the IBM/ring |
Could you please rebase on top of I think that we need to adapt the CI changes from #1297 to also test this target in CI, especially because I believe this will be the first 64-bit little-endian target that uses some of the fallback code, so we need to make sure it is tested in CI. Originally we had some MIPS CI coverage for this code, but I had to remove it because that MIPS target got downgraded by the Rust project and broke our build. Here is how I am going to test this PR locally:
Roughly you need to copy and adapt this logic in
And this logic in
Then in .github/ci.yml you need to add a line to the target matrix for this target. See #1297. (Please use clang and not GCC for this CI integration.) |
I am intending to do a release soon, probably this week. If this PR is ready to merge before the release, I will include it. Otherwise, I am happy to do a 0.17.1 release with this. |
Since we got MIPS working at one point in CI, I believe that PowerPC should work now as well. |
69226a7
to
5cfac6a
Compare
Thanks for the response! I've pushed a rebased branch with the CI support added, though I have a couple comments/questions:
|
I will post a PR to fix this today.
Don't worry about it for now. |
Please rebase on main and resubmit. Thanks! |
5cfac6a
to
0362bf3
Compare
Done! |
|
Good news: Less good news: |
0362bf3
to
0e36904
Compare
Rebased on top of new main, moved definitions to |
Sorry, this is a nightmare for merge conflicts because the merges I have are riscv (done), ppc64le, and s390x, which alphabetically are adjacent, so every change conflicts. Please rebase one more time and I will do my best to merge this before I merge another conflict. Then I will merge s390x after that is rebased. Sorry for the inconveniences. |
Signed-off-by: Eric Richter <erichte@linux.ibm.com>
Other architectures may not need to do feature checks, and therefore Feature::available, Feature::mask, etc are never used/read. This snippet mirrors the similar bit at the top of cpu/intel. Signed-off-by: Eric Richter <erichte@linux.ibm.com>
Signed-off-by: Eric Richter <erichte@linux.ibm.com>
0e36904
to
5c496c5
Compare
No worries! Rebased, and fixed the conflicts, preserving the alphabetic order of the targets. |
Thank you! |
Revive PR #819 (by q66) in reduced-scope by implementing powerpc64le support in ring. This effort supports only little endian machines using POWER8 and later processors for now. The goal is to enable ring to target modern powerpc64le machines.
Only the bare minimum needed to build ring and pass ring tests is included; there is no new optimized code for algorithms already implemented in C/Rust. This has been tested on a POWER9 Blackbird, and on a POWER8 machine.