Skip to content

RVVM v0.6

Latest
Compare
Choose a tag to compare
@LekKit LekKit released this 18 Mar 16:39
· 524 commits to staging since this release
f937fd8

This release includes

  • Prebuilt rvvm-cli & librvvm v0.6 for Linux, Windows, MacOS x86_64
  • More builds will be added later or should build from source
  • Prebuilt riscv64 U-Boot 2024.1 fw_payload.bin EFI firmware; With NVMe & EFIFB support patches, has framebuffer console
  • Prebuilt riscv64 Arch RISC-V image with networking, nano, sshd. Credentials are root:riscv. Built with archriscv-scriptlet, with mkinitcpio config for faster boot, no firmware
  • Prebuilt riscv64 Debian image, see dqib. Notice they don't have framebuffer & I2C-HID enabled in the kernel. Credentials: root:riscv
  • Prebuilt riscv64 OpenSBI 1.4 fw_jump.bin for use as an SBI bootrom with a custom kernel payload. Generic upstream OpenSBI works too.
  • Prebuilt riscv64 static Linux 6.8.1 kernel Image linux_6.8 for tinkering
  • See LekKit/patches-misc for firmware/kernel configs, patches and more

HOWTO

  • To boot a generic distro/EFI image, use rvvm fw_payload.bin -m 2G -i archriscv.img. Be aware some images may be slow to boot, and usually need more than default 256M of RAM.

  • Arch RISC-V image is included with full support. Debian lacks framebuffer/i2c-hid drivers in their kernel, but is otherwise functional over uart/ssh.

  • Generic Ubuntu 23.10 image works, but is overall bloated: https://cdimage.ubuntu.com/releases/23.10/release/ubuntu-23.10-preinstalled-server-riscv64.img.xz. Press Enter over the UART (your terminal) at GRUB screen. Credentials: ubuntu:ubuntu. Xorg lags heavily because of a bug in an older version, disable HW accel in xorg config.

  • FreeBSD 13.3 works: https://download.freebsd.org/snapshots/VM-IMAGES/13.3-STABLE/riscv64/Latest/FreeBSD-13.3-STABLE-riscv-riscv64.raw.xz. Credentials: root:root, use # kldload if_re to load networking driver.

  • To boot a rootfs inside an image with a static kernel payload, use rvvm fw_jump.bin -k linux_6.8 -i rootfs.img. This is useful for distros without an official bootable image, like Buildroot, and is usually faster. If your image doesn't directly contain a root filesystem, you can pass -append root=/dev/nvme0n1p1 or the likes to the RVVM, and this cmdline will reach the guest kernel

New features

  • Networking is now stable and enabled by default
  • Allow port forwarding to the guest with -portfwd 127.0.0.1:8080=80
  • Support relative mouse movement, grabbing the host mouse
  • Support international keyboard layouts (I.e. keys specific to Japanese, Korean, German etc keyboards)
  • Optional SDL2 GUI backend
  • Support Big-endian hosts (MIPS64, PowerPC64) properly
  • SiFive GPIO support
  • MTD physmap firmware chip
  • Dallas DS1742 Real-time clock
  • Support (multiple) PTY or UNIX sockets as UART character device with -serial [file], silent UART with -serial null;
  • Support explicitly choosing NVMe or ATA with -ata [img] or -nvme [img]
  • Support using host block devices (/dev/sda, /dev/mmcblk) as RVVM drives
  • Faster threaded IO implementation
  • Faster UART console (Especially on Windows, Serenity)
  • Optimized Win32 display rendering
  • Slightly better RVJIT x86 register allocation
  • RVJIT significantly optimizes memory accesses with userland CPU emulation (To the point of near-native perf of user emulation)
  • Rework CMake build system to build shared librvvm properly
  • Colorful logger
  • Libretro port
  • [WIP] Began work on a Linux userspace binary emulator. Many riscv64 glibc binaries work, but threading and JIT caches are flaky.

RVVM API Improvements:

  • Character device API
  • GPIO API
  • Provide a separate mapping property for direct MMIO regions
  • Omit PC increment for traps in Userland API
  • Support non-canonical framebuffer stride
  • Return rvvm_mmio_handle_t upon attaching most de-attachable MMIO devices
  • Implement RVVM_OPT_MEM_BASE, RVVM_OPT_MEM_SIZE to query RAM configuration of the machine.
  • Implement RVVM_OPT_HART_COUNT to query amount of cores
  • Java JNI bindings

Fixes, compatibility

  • Fix crashes when explicitly unloading librvvm shared library (#97)
  • Fix NVMe deadlock reporting when host IO is slow (#99)
  • More bullerproof RVJIT cache allocation (#98)
  • Implement RT8169 93C56 EEPROM to fix FreeBSD & Haiku OS networking (#118)
  • Fix rare keypress loss (#126)
  • Fix pending PLIC interrupts not being re-delivered upon writes to prio/enable/threshold
  • Fix 0-byte UDP payloads with tap_user backend
  • Fix TCP connection tuple lookup
  • Improve TCP stability immensely with tap_user backend
  • Fix networking on NetBSD
  • Implement proper FMA emulation without dual rounding in FPU, advertise FENV_ACCESS
  • Fix endianness issues in FPU
  • Fix several VMA operations on Win32 hosts
  • Support both UTF8 and system locale paths on Win32 hosts
  • Use pthread_cond_timedwait_relative_np() on MacOS to fix possible hang upon wall clock change
  • Fix MMIO op size validation
  • Fix PCI attach failure handling with all the devices
  • Fix non-working I2C ocores with FreeBSD guest
  • Advertise zicsr, zifencei extensions in CPU DT
  • Fix KSM & THP erroneously not being enabled
  • Use .dylib extension for MacOS shared lib target
  • Fix OpenBSD CMake build due to type naming collisions
  • Fix CMake build on arches without a JIT backend
  • Fix Serenity build warnings due to macro naming collisions
  • Myriad of small fixes

New Contributors

Full Changelog: v0.5...v0.6