Skip to content

Add the RV64 userland platform runtime - #1982

Draft
Weidong Cui (wdcui) wants to merge 3 commits into
uliteboxfrom
wdcui/ulitebox/riscv64-platform
Draft

Weidong Cui (wdcui) wants to merge 3 commits into
uliteboxfrom
wdcui/ulitebox/riscv64-platform

Conversation

@wdcui

Copy link
Copy Markdown
Member

This PR adds an RV64 runtime to litebox_platform_linux_userland so static RV64GC guests can run on RV64 Linux hosts. While a guest runs, physical gp points to a per-thread GateTls block, and rewritten gp uses and ecalls enter gates that litebox_trampoline now emits for the rewriter. Signal handling canonicalizes interrupted gates, guest FP state is saved and restored on both resume paths, core gains the RV64 FpState, and CI adds an RV64 qemu-user job.

Weidong Cui (wdcui) and others added 3 commits November 26, 2026 14:37
Run static RV64GC guests on an RV64 Linux userland platform. Physical gp
points to the runner's per-thread GateTls block while the guest runs, and
rewritten gp uses and ecalls enter gates emitted by litebox_trampoline.
Signal handling canonicalizes interrupted gates, guest FP state is saved
and restored, and CI gains an RV64 qemu-user job.

Co-authored-by: Copilot <[email protected]>
Copilot-Session: d86db0f4-2325-431f-b45d-618163087b99
Correct the gate ABI, emit and recovery docs, and drop t3 from the
registers a gate may borrow: a relocated instruction has at most three
operands, one of them gp, so one of t0-t2 is always free.

Co-authored-by: Copilot <[email protected]>
Copilot-Session: d86db0f4-2325-431f-b45d-618163087b99
Correct and reword doc comments in the RV64 userland platform runtime, and
replace negated target_arch cfgs in lib.rs with explicit architecture lists.

Co-authored-by: Copilot <[email protected]>
Copilot-Session: d86db0f4-2325-431f-b45d-618163087b99
@github-actions

Copy link
Copy Markdown

🤖 SemverChecks 🤖 No breaking API changes detected

Note: this does not mean API is unchanged, or even that there are no breaking changes; simply, none of the detections triggered.

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.

1 participant