-
Notifications
You must be signed in to change notification settings - Fork 109
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
Allow JIT compilation for system emulation #521
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Benchmarks
Benchmark suite | Current: 4ef61b8 | Previous: 7a032db | Ratio |
---|---|---|---|
Dhrystone |
1284 Average DMIPS over 10 runs |
1340 Average DMIPS over 10 runs |
1.04 |
Coremark |
972.508 Average iterations/sec over 10 runs |
947.06 Average iterations/sec over 10 runs |
0.97 |
This comment was automatically generated by workflow using github-action-benchmark.
73b1ba5
to
09fc945
Compare
Testing Report:x86-64 machine: Kernel message Logs:
Aarch64 machine: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rebase the latest master branch and resolve the conflicts.
09fc945
to
cf39d8f
Compare
Code Review Agent Run #365781Actionable Suggestions - 16
Additional Suggestions - 10
Review Details
|
Changelist by BitoThis pull request implements the following key changes.
|
Code Review Agent Run #708454Actionable Suggestions - 1
Additional Suggestions - 1
Review Details
|
08bbf92
to
1b8f4b0
Compare
Code Review Agent Run #c0fb25Actionable Suggestions - 10
Additional Suggestions - 10
Review Details
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rebase the latest master
branch and resolve the conflicts.
Run JIT enabled system emulation verification in CI? |
The file is generated by "tools/gen-jit-template.py" To bring up the Linux Kernel to just-in-time (JIT) compilation, we need to update the memory-related operation with the memory management unit. However, the current "src/rv32_jit.c" was generated by the template. That template reduced the rework for the repeated statements, but also reduced the flexibility and the intuitiveness for bring up the new feature. In this commit, we deprecate that template and just use a regular file for the flexibility.
This commit introduces "satp" field to the block structure in JIT mode to ensure the block cache is replaced correctly. The MOP fusion and T2C are disabled temporarily. Use the following commands to boot the Linux Kernel: $ make ENABLE_SYSTEM=1 ENABLE_MOP_FUSION=0 ENABLE_JIT=1 ENABLE_T2C=0 $ ./build/rv32emu -k <image> -i <rootfs> -b <dtb>
1b8f4b0
to
4ef61b8
Compare
It had been added in 8d46115 . |
Code Review Agent Run #77d5d2Actionable Suggestions - 4
Additional Suggestions - 10
Review Details
|
Thank @vacantron for contributing! |
This patch makes
rv32emu
support the just-in-time (JIT) compilation in system simulation. To achieve this goal, a "satp (supervisor address translation and protection)" field has been introduced to the block structure in JIT mode to ensure the block cache is replaced correctly.The file
src/system.c
has been updated for the easier reuse of functions, and the MOP fusion and T2C are disabled temporarily. To boot the Linux Kernel, try the following commands:Summary by Bito
This PR implements JIT compilation support for RISC-V system emulation by adding SATP tracking and MMU-aware instruction handling. The changes include refactoring MMIO operations into separate helper functions, implementing comprehensive instruction handlers with proper memory access handling, and enhancing the block caching system with improved error handling for Linux kernel boot compatibility.Unit tests added: False
Estimated effort to review (1-5, lower is better): 5