Re: VirtIO MMIO for amd64

Emile 'iMil' Heitor <[email protected]>
Newsgroups gmane.os.netbsd.devel.kernel
Message-ID <[email protected]>
Update

I've got current/amd64 booting on an MMIO-backed block device
with qemu's microvm machine, in both ACPI and command-line-hack
(which passes the "device" address as a kernel parameter).

If anybody wants to give it a try:

$ qemu-system-x86_64 -M microvm,rtc=on -enable-kvm -m 256 -cpu host 
-kernel netbsd.gdb -append "root=ld0a console=com rw" -serial stdio 
-display none -device virtio-blk-device,drive=hd0 -drive 
file=netbsd.img,format=raw,id=hd0 -no-acpi

Note the "rtc=on", without this init_main.c/inittodr(rootfstime)
hangs.

On the other hand, Firecracker loops on an init sig11 crash, I
suspect that might also be related to RTC, I guess I'll have to port
a virtio RTC.

The branch with this feature is here 
https://github.com/NetBSDfr/NetBSD-src/tree/mmio_cmdline
It includes the GENPVH mode to boot the NetBSD kernel from
qemu's -kernel flag.
You'll need at least those two:

virtio* at cmdlinebus?
#virtio* at acpi?
ld*	at virtio?			# Virtio disk device

As previously said, virtio* at acpi? also works.

-- 
------------------------------------------------------------------------
Emile `iMil' Heitor <imil@{home.imil.net,NetBSD.org}> | https://imil.net
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.