Basic VMM support for RISC-V.
Lots of TODOs indicated within the code, but working for me on single core, single guest VM instance.
Differential D45553
bhyve/riscv kernel part br on Mon, Jun 10, 8:52 PM. Authored by Tags None Referenced Files
Subscribers
Details Basic VMM support for RISC-V. Lots of TODOs indicated within the code, but working for me on single core, single guest VM instance. tested 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 (in both host&guest kernels I have a small mdroot embedded)
Diff Detail
Event TimelineComment Actions Without wanting to give a detailed review of the whole thing, I will say that implementing SBI should be done in userspace, it doesn't need to be in the kernel (and really needs to be in userspace to be able to handle the console I/O calls), just like arm64 has PSCI in userspace. You want to just have it send up a VM_EXITCODE_ECALL. Comment Actions Handle entire SBI in userspace based on jrtc27@ suggestion. We may need however to handle the IPI or TIME (in case of no SSTC) extensions here in kernel for speed (?), so leave the no-op vmm_sbi.c file for now for debugging purposes. Comment Actions Hi, just a preliminary look, much of the vmm code is beyond me. I hope to test this stuff in a couple weeks! Two things which could be extracted and committed now:
|