tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: VirtIO MMIO for amd64




On 12/16/23 10:25, Emile 'iMil' Heitor wrote:
FYI I'm on it, based on Colin Percival's work here https://github.com/freebsd/freebsd-src/blob/main/sys/dev/virtio/mmio/virtio_mmio_cmdline.c
I'm getting some results but Firecracker uses MMIO v2 and we only have
v1 so there's still quite some work to do.

So far I get the block device and the correct geometry
is reported

[   1.0000030] virtio0 at mainbus0
[ 1.0000030] kernel parameters: console=com root=ld0e virtio_mmio.device=4K@0xd0000000:5
[   1.0000030] viommio: 4K@0xd0000000:5
[   1.0000030] virtio0: block device (id 2, rev. 0x02)
[   1.0000030] ld0 at virtio0: features: 0x100000000<V1>
[ 1.0000030] ld0: 30720 KB, 60 cyl, 16 head, 63 sec, 512 bytes/sect x 61441 sectors
[   1.0199904] boot device: ld0

but I get stuck in sys/kern/subr_disk_open.c in opendisk() at:

error = VOP_OPEN(tmpvn, FREAD | FSILENT, NOCRED);

ideas on what could be locking here?
Maybe related: the interrupt handler function I wrote uses
softint_establish() as there's no "real" hardware behind this
block device, is this the correct way to deal with it?

Anybody wanting to have a look https://imil.net/NetBSD/mmio.patch
It applies over this branch https://github.com/NetBSDfr/NetBSD-src/tree/GENPVH

--
------------------------------------------------------------------------
Emile `iMil' Heitor <imil@{home.imil.net,NetBSD.org}> | https://imil.net


Home | Main Index | Thread Index | Old Index