-
Notifications
You must be signed in to change notification settings - Fork 17
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
Prepare for upstream? #3
Comments
Thanks, my aim is to have this port upstreamable some time in the second half of this year. Goal is that it should initially support RV64GC, pass the whole Valgrind test suite and be able to run some larger applications. Remaining main work for that is on completing support for RV64F, enabling gdbserver, adding coredump support and generally stabilizing the port. |
Hi Petr, |
Go for it! Let me know if you require any hints. |
@Xeonacid do you have progress on that? let me know if you need help |
@Xeonacid Is there any work left? |
You might try fixing the tests and adding some unit tests for riscv. :) |
Good, that's something to do. Thanks |
We (Alibaba T-Head) can help to rebase this and upstream also, any issues or work we can help ? |
@petrpavlu Hello ? |
My roadmap at the moment looks as follows. The items are not in any specific order:
I'm afraid a lot of this work is basically cleaning up and finishing things in many different areas, which might be hard for people to pick up if they are not already familiar with the relevant code. If someone is looking for smaller tasks to tackle then perhaps analyzing and fixing remaining test failures might be suitable. Scope of the initial port is to support only RV64GC. I don't have any immediate plan to work on the mentioned V (vector) or Zfh (half-precision floating-point) extensions. I realize they will need to be supported at some point but my plan is to rather get a good working port for RV64GC and try to upstream it first. Adding support for these and other extensions might be then a good opportunity for someone other, as it should be fairly separate and well defined work. It should avoid risk of a duplicated effort. |
I agree with you to clean up codes after I looked details of your code (front-end) in translation module, there are some questions for me:
Is there any time schedule ?
we can help to support Zfh extension based on your code if nobody have schedule to implement that :) |
The backend (
The frontend code is very linear, it simply decodes instructions one by one. It doesn't look to me that splitting it into multiple files would make it easier to navigate. It is also important that the overall Valgrind project has consistent implementation. The riscv64 code in this case follows what is done for other supported architectures upstream.
I don't think it is easily possible but I'm not sure what particular idea you have in mind.
I'm hoping to send initial patches for upstream review soon. Review process and inclusion upstream usually takes some time so that still gives room in the meantime to address various TODOs. Some remaining ones and also other further work would be then done upstream, at least that is the idea. It looks better to me to upstream support for RV64GC at once. It is the current base target for most Linux distributions and so supporting less than that is generally not very useful. Besides, the code is already there and it would only create more effort to have to split it up for multiple reviews.
Sure, go ahead. I currently don't intend to work on supporting the Zfh extension and I'm not aware of anyone else looking at it. I'd be happy to review its implementation and include it in the port. Let me know if you need any help. Please be only aware that I plan to do some reshuffling of the backend code (as mentioned earlier) so that might cause then a bit of extra work to rebase your code. |
I won't be able to help review the VEX code as it's the bit that I know the least. But I'm ready upstream and already done some testing and added a couple of issues. |
We'll be discussing this on Friday (10th Feb 2023). See the valgrind developers mailing list. |
Thanks for the notice. I should be able to join. |
@petrpavlu We have finished Zfh ISA extension and start full regressing. |
Nice!
The following is from openSUSE Tumbleweed 20220926 and with packages gcc-12-2.1.riscv64 + glibc-2.36-5.1.riscv64:
|
@petrpavlu @paulfloyd we finished full regression of Zfh extension ISA, |
"Valgrind community" usually just means Mark W, Julian S and myself (with Julian often being busy with other work). We discussed upstreaming at a recent video conf. Work is planned to start after the Valgrind 3.21 release at the end of April. @petrpavlu have you considered asking Mark and Julian if you can get a commit bit for sourceware.org? That would make upstreaming and maintenance a lot easier. |
Sounds good 👍 BTW, |
@rjiejie As far as I'm aware, no need to sign a license. Valgrind is GPLv2 (with the exception of the public headers which are BSD licensed to allow users to include them in order to use client requests). Each new file must start with the GPLv2 license and also include a copyright notice. Optionally you may want to create a "README.riscv" file in the top source directory. Here you can put things like where to get more RISC-V info, a list of todos and some history of the port and contributors. |
Sounds good, I'll review the changes. Note that as previously mentioned, I did some reshuffling of the backend code to avoid a lot of almost duplicate code and to be more consistent with how other backends look like, in particular AArch64 and MIPS ones. Hopefully it won't create much extra work for you to rebase your changes. You can also potentially post your current changes as-is and I can rebase them myself.
I will most likely ask for that some time during upstream review of the port.
Agreed, adding |
@petrpavlu i have rebased and made a pull request #12 to your branch :) For Zfh (float16) extension ISA, I add some common IRs, pls help to review also @paulfloyd |
I can look, but VEX is the part that I've worked on the least. |
@paulfloyd How do I commit patch to community mail list ? |
@rjiejie if your patch is only for riscv, just go though the pull request process here and let @petrpavlu handle it. if you have something that is not riscv specific, https://bugs.kde.org is the place to submit patches Valgrind has a very long history, so the mailing lists are on sourceforge, the git repo hosted by sourceware (as is the web site now) and the bugzilla is kde. |
It's not a bug, it's a improved patch, I need to commit into bug system also ? |
If the patch is for riscv you need to submit it here. |
@petrpavlu We make other some PRs for riscv also, pls review them #13 #14 |
Opened https://bugs.kde.org/show_bug.cgi?id=468575 with v1 posted so Valgrind maintainers can start looking at this port. Note: I'm aware of #16. I'll review it and add it in a next version for upstream with any other fixes. |
excellent efforts and big news :)
Ok, thanks. |
@paulfloyd @petrpavlu RVV like ARM's SVE programming model, it's scalable/VLA, that means the vector length is agnostic. There is not any VLA vector IR to represent these vector model, it's the big issue. Any ideas for supporting of scalable vector model ? |
use another individual issue to follow vector #17 |
@paulfloyd any news on the merge ticket on KDE bug tracker? |
There was a thread discussing vector extensions. I need to check if that has reached a conclusion. Other than that, it's just a question of time and having too many other things to do. I do have access to at least one riscv machine
|
There are another 5 StarFive VF2 boards in Sourceware buildbot farm. Valgrind hasn't been enabled there yet. |
I'm sure that Mark Wielaard will do the necessary setup once riscv has been merged in git. |
Hi,
Amazing work!
Do we have a plan to let Valgrind upstream merge this feature?
If there are need help with real riscv64 hardware resources, please let me know.
Thanks again for your great work~
The text was updated successfully, but these errors were encountered: