Skip to content

Conversation

@Ivan-Velickovic
Copy link
Collaborator

(Rebased version of #121, new PR due to commit history changes.)

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:

The simple example works with QEMU virt RISC-V, I am working on getting it working
on the SiFive Premier P550.

To get the simple example running on QEMU, run the following command:

cd examples/simple
zig build -Dsdk=<microkit sdk> -Dboard=qemu_virt_riscv64 -Dlinux=board/qemu_virt_riscv64/linux -Dinitrd=board/qemu_virt_riscv64/rootfs.cpio.gz qemu

@Ivan-Velickovic Ivan-Velickovic marked this pull request as draft May 5, 2025 06:03
@Ivan-Velickovic Ivan-Velickovic force-pushed the riscv branch 11 times, most recently from 3238757 to cbc6d8a Compare July 21, 2025 01:46
@Ivan-Velickovic Ivan-Velickovic force-pushed the riscv branch 5 times, most recently from 4fb9340 to 31d9359 Compare July 24, 2025 07:13
Signed-off-by: Ivan-Velickovic <i.velickovic@unsw.edu.au>
There's a bunch of checks that apply to both ARM/RISC-V guests
so just extract it out into general linux.c

Signed-off-by: Ivan-Velickovic <i.velickovic@unsw.edu.au>
Signed-off-by: Ivan-Velickovic <i.velickovic@unsw.edu.au>
Signed-off-by: Ivan-Velickovic <i.velickovic@unsw.edu.au>
Signed-off-by: Ivan-Velickovic <i.velickovic@unsw.edu.au>
Signed-off-by: Ivan-Velickovic <i.velickovic@unsw.edu.au>
Signed-off-by: Ivan-Velickovic <i.velickovic@unsw.edu.au>
Signed-off-by: Ivan-Velickovic <i.velickovic@unsw.edu.au>
Signed-off-by: Ivan-Velickovic <i.velickovic@unsw.edu.au>
* adjust build.zig for 0.15.1
* minor fixes due to sddf update

Signed-off-by: Ivan-Velickovic <i.velickovic@unsw.edu.au>
Signed-off-by: Ivan-Velickovic <i.velickovic@unsw.edu.au>
Signed-off-by: Ivan-Velickovic <i.velickovic@unsw.edu.au>
…est RAM

Signed-off-by: Ivan Velickovic <i.velickovic@unsw.edu.au>
Signed-off-by: Ivan Velickovic <i.velickovic@unsw.edu.au>
Signed-off-by: Ivan-Velickovic <i.velickovic@unsw.edu.au>
Linux begins booting but once it switches from earlycon using SBI
to the pass-through serial, it hangs.

I suspect something is still wrong with the IRQ injection.

Signed-off-by: Ivan-Velickovic <i.velickovic@unsw.edu.au>
Signed-off-by: Ivan-Velickovic <i.velickovic@unsw.edu.au>
Signed-off-by: Ivan-Velickovic <i.velickovic@unsw.edu.au>
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