Skip to content

feat!: bump QEMU to 5.1.0 #2143

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

Open
wants to merge 15 commits into
base: dev
Choose a base branch
from
Open

Conversation

amaanq
Copy link
Contributor

@amaanq amaanq commented Apr 5, 2025

Note

This PR is insanely large - every commit is atomic in nature, but it's still not super easy to review. I've tried to make it as easy as possible by splitting each arch's update into their own commit, as well as various QEMU components so that the more important stuff like FPU/TCG changes can be more easily reviewed. I don't think it's really possible to fully review the code, especially stuff like RISC-V's decode_insn(16|32).inc.c files - in these cases, building QEMU 5.1.0 and comparing the files should suffice.

Problem

Unicorn is on QEMU 5.0.1, which is 5 years old now and is missing a ton of new features. We should ideally be updating QEMU to allow users to use these new features.

Solution

This PR upgrades QEMU from 5.0.1 to 5.1.0. It is very large, namely due to many changes in the FPU and TCG backends, and large changes in ARM (for MTE & TTS2UXN support) and RISC-V (new CPU support & lots of insn translation additions). The public-facing changes for consumers of Unicorn are:

  • MTE & TTS2UXN support for ARM, meaning, in theory, instructions that leverage memory tagging should work (IRG, ADDG, etc.)
  • New Loongson MIPS CPUs
  • New RISC-V CPUs

@amaanq amaanq marked this pull request as draft April 5, 2025 08:36
@amaanq amaanq force-pushed the qemu-5.1.0 branch 14 times, most recently from ee0af5c to e536e9c Compare April 6, 2025 02:31
@amaanq amaanq marked this pull request as ready for review April 6, 2025 04:43
@wtdcode
Copy link
Member

wtdcode commented Apr 6, 2025

While I truly appreciate and respect your efforts, merging this will inevitably block previous PRs for new architectures, which also needs upgrading to 5.1.0. My bandwidth is quite full before early May and thus giving the fact that I plan to release 2.2.0 in June, please expect delay for this PR till then.

Or if you wish, i.e. it is totally optional and much more appreciated if done, you might review/push those PR forwards.

@amaanq
Copy link
Contributor Author

amaanq commented Apr 6, 2025

Yeah that's totally understandable - I could review and/or update those PRs as well, wouldn't mind doing that (though for updating for 5.1.0 I might need to have you apply a patch OR I can open my own PR stacked on top of the contributor's)

@wtdcode
Copy link
Member

wtdcode commented Apr 6, 2025

I will create a standalone branch like “staging” shortly so that we can have a playground for such big updates.

@amaanq amaanq changed the title qemu 5.1.0 feat!: bump QEMU to 5.1.0 Apr 6, 2025
@wtdcode
Copy link
Member

wtdcode commented Apr 6, 2025

Okay, playground is there =)

@wtdcode
Copy link
Member

wtdcode commented Apr 6, 2025

I will firstly try to merge all those PR together and get a TODO list:

#2145

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants