Home | History | Annotate | Download | only in x86
History log of /src/sys/dev/virtio/arch/x86/virtio_mmio_cmdline.c
RevisionDateAuthorComments
 1.1  15-Jan-2025  imil Add support for command line MMIO devices, at least qemu and
Firecracker pass MMIO virtual devices mapping through the kernel
command line.
This driver is based on Colin Percival's FreeBSD virtio_mmio_cmdline.c
https://github.com/freebsd/freebsd-src/blob/main/sys/dev/virtio/mmio/virtio_mmio_cmdline.c

The following kernel options are needed

options MPBIOS
options MPTABLE_LINUX_BUG_COMPAT

As are these drivers

pv* at pvbus?
virtio* at pv?

Exemple qemu usage on a Linux host to boot a NetBSD guest:

qemu-system-x86_64 \
-M microvm,x-option-roms=off,rtc=on,acpi=off,pic=off,accel=kvm \
-m 256 -cpu host -kernel ${KERNEL} \
-append "root=ld0a console=com rw -v" \
-device virtio-blk-device,drive=hd0 \
-drive file=${IMG},format=raw,id=hd0 \
-device virtio-net-device,netdev=net0 \
-netdev user,id=net0,ipv6=off,hostfwd=::2200-:22 \
-global virtio-mmio.force-legacy=false -display none -serial stdio

A lightweight kernel configuration named MICROVM if available for this
use case.

RSS XML Feed