I use following QEMU scripts:
haiku_loader.riscv:
/boot/data/packages/haikuports/app-emulation/qemu/work-6.0.0/sources/qemu-6.0.0/build/install/bin/qemu-system-riscv64 \
-machine virt \
-global virtio-mmio.force-legacy=false \
-m 1G \
-bios "/Haiku/data/packages/haiku/generated.riscv64/objects/haiku/riscv64/release/system/boot/riscv/haiku_loader.riscv" \
-serial stdio \
-parallel none \
-monitor none \
-device ati-vga \
-device virtio-blk-device,drive=x0,bus=virtio-mmio-bus.2 \
-device virtio-net-device,netdev=usernet,bus=virtio-mmio-bus.3 \
-drive file="/Haiku/data/packages/haiku/generated.riscv64/haiku-minimum2.image",if=none,format=raw,id=x0 \
-netdev user,id=usernet \
-device nec-usb-xhci,id=xhci \
-device usb-tablet,bus=xhci.0 \
-device usb-kbd,bus=xhci.0
haiku_loader.efi (need u-boot firmware image):
/boot/data/packages/haikuports/app-emulation/qemu/work-6.0.0/sources/qemu-6.0.0/build/install/bin/qemu-system-riscv64 \
-machine virt \
-global virtio-mmio.force-legacy=false \
-m 256M \
-kernel u-boot.bin \
-serial stdio \
-parallel none \
-monitor none \
-device ati-vga \
-device virtio-blk-device,drive=x0,bus=virtio-mmio-bus.3 \
-device virtio-blk-device,drive=x1,bus=virtio-mmio-bus.2 \
-device virtio-net-device,netdev=usernet,bus=virtio-mmio-bus.4 \
-drive file="/boot/data/packages/haiku/generated.riscv64/haiku-minimum.image",format=raw,id=x0 \
-device nec-usb-xhci,id=xhci \
-device usb-tablet,bus=xhci.0 \
-device usb-kbd,bus=xhci.0 \
-netdev user,id=usernet