Basic VMM support for RISC-V.
Lots of TODOs indicated within the code, but working for me on multi-core host with multi-core guest (single guest VM instance only)
Paths
| Differential D45553 Authored by br on Jun 10 2024, 8:52 PM.
Details Summary Basic VMM support for RISC-V. Lots of TODOs indicated within the code, but working for me on multi-core host with multi-core guest (single guest VM instance only) Test Plan Spiketested in Spike ./spike -m4096 -d --isa RV64IMAFDCH_zicntr_zihpm_sstc --kernel /usr/obj/usr/home/br/dev/freebsd/riscv.riscv64/sys/GENERIC/kernel.bin ../../opensbi/build/platform/generic/firmware/fw_jump.elf and then bhyve -m 2560 -o bootrom=/kernel.bin -o console=stdio -s 4,ahci-hd,/bin/ls test QEMUtested in Qemu 8-core: ./qemu-system-riscv64 -nographic \ -machine virt \ -cpu 'rv64,h=true' \ -smp 8 \ -m 8G \ -bios ../../opensbi/build/platform/generic/firmware/fw_jump.elf \ -kernel /usr/obj/usr/home/br/dev/freebsd/riscv.riscv64/sys/GENERIC/kernel.bin and then bhyve -c 8 -m 2560 -o bootrom=/kernel.bin -o console=stdio -s 4,ahci-hd,/bin/ls test (in both host&guest kernels I have a small mdroot embedded)
Diff Detail
Event TimelineThere are a very large number of changes, so older changes are hidden. Show Older Changes br edited the summary of this revision. (Show Details)Jul 15 2024, 9:34 PM2024-07-15 21:34:32 (UTC+0) Comment Actions APLIC emul: allow injection of pending bit when interrupt source disabled (It wont fire until OS enable it). This may fix AHCI attachment on boot
Comment Actions Try to address issues discovered by jrtc27:
Comment Actions handle VM_EXITCODE_SUSPENDED.
Herald added a reviewer: andrew. · View Herald TranscriptOct 28 2024, 2:32 PM2024-10-28 14:32:29 (UTC+0)
This revision was not accepted when it landed; it landed in state Needs Review.Oct 31 2024, 8:25 PM2024-10-31 20:25:56 (UTC+0) This revision was automatically updated to reflect the committed changes. Herald added a subscriber: imp. · View Herald TranscriptOct 31 2024, 8:25 PM2024-10-31 20:25:56 (UTC+0)
Revision Contents
Diff 142843 sys/conf/files.riscv
sys/conf/kern.mk
sys/riscv/include/cpu.h
sys/riscv/include/elf.h
|
The credit will alreay be present in the commit message, please do not add more in the Makefile.