-
Notifications
You must be signed in to change notification settings - Fork 15
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
Add support for RISC-V #121
Draft
Ivan-Velickovic
wants to merge
11
commits into
main
Choose a base branch
from
riscv
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Ivan Velickovic <[email protected]>
Now we are stuck on this line: 'cpuidle: using governor menu'
Current progress: ``` [ 0.095968] Unpacking initramfs... [ 0.212981] Freeing initrd memory: 16384K [ 0.214101] workingset: timestamp_bits=46 max_order=16 bucket_order=0 [ 0.216709] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 246) [ 0.216914] io scheduler mq-deadline registered [ 0.217026] io scheduler kyber registered [ 0.217192] io scheduler bfq registered VMM|INFO: handling fault 'virtual memory exception' VMM|INFO: fault on addr 0xc002080 VMM|INFO: handling plic 0xc002080 VMM|INFO: satp: 0xa0000000000814f7 Failed assertion '(satp >> 60) == SV39_MODE' at /Users/ivanv/ts/libvmm/src/arch/riscv/fault.c:111 in function guest_virtual_physical ``` now need to deal with PLIC faults Things are a bit concerning because I had to disable two Linux kernel config options: * CONFIG_RISCV_ISA_ZICBOM * CONFIG_RISCV_PROBE_UNALIGNED_ACCESS ZICBOM was causing a vCPU fault, maybe there's something that seL4 needs to allow at VS level that it's not. What's weirder is that program counter in Linux was at the specific point of a no-op instruction which is weird. Secondly, RISCV_PROBE_UNALIGNED_ACCESS was causing some hanging because it's using `rdtime` to determine whether unaligned access is allowed by the hardware. This again is an issue with how we are emulating as the Linux image with both of these configs enabled runs fine bare-metal on QEMU (without seL4 involved.). More investigation required...
Problem is that FPU access in Linux or Linux user-space causes exceptions *in Linux*, which is weird for two reasons: 1. We have the FPU enabled for QEMU in seL4 so I would think that the guest would have FPU access as well. 2. Why is an illegal instruction exception that happened *within Linux* being handled by Linux instead of the VMM?
Timer IRQs are now handled, some fixes in seL4 itself were needed
Ivan-Velickovic
force-pushed
the
riscv
branch
from
November 1, 2024 00:48
f4b2b9a
to
9a2ee1f
Compare
Signed-off-by: Ivan-Velickovic <[email protected]>
Ivan-Velickovic
force-pushed
the
riscv
branch
from
November 1, 2024 00:57
b0ef327
to
4bd8c21
Compare
Signed-off-by: Ivan-Velickovic <[email protected]>
Signed-off-by: Ivan-Velickovic <[email protected]>
Signed-off-by: Ivan-Velickovic <[email protected]>
Ivan-Velickovic
force-pushed
the
riscv
branch
from
November 6, 2024 00:04
0d6bfd7
to
cafeace
Compare
Ivan-Velickovic
force-pushed
the
riscv
branch
from
December 2, 2024 04:43
728d3fb
to
27b20d3
Compare
Signed-off-by: Ivan-Velickovic <[email protected]>
Ivan-Velickovic
force-pushed
the
riscv
branch
from
December 2, 2024 04:43
27b20d3
to
0a1299e
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds initial support for RISC-V guests to libvmm.
Right now, only 64-bit guests are supported/tested.
This PR is a draft as there is still much more work to do and more to test/fix such as multiple vCPUs are more complex example systems, but right now a Linux guest can boot and get into user-space.
This PR will likely not be merged for a while as it depends on changes to seL4, which will require an RFC and code review that typically takes months.
To try out this PR, you will need changes a specific branch of Microkit and seL4: