@slp hey there :) I have a preliminary/WIP implementation for multiport, but for a reason I can't figure out, after sending the VIRTIO_CONSOLE_DEVICE_READY, control rx vq never gets updated with VIRTIO_CONSOLE_PORT_ADD, the rx interrupt function is never triggered. Any idea comes to mind? VirtIO documentation is pretty poor on the matter and linux driver is a mess... https://imil.net/NetBSD/viocon_multiport.patch
@imil
I don't have an answer for you, but I can tell you by experience that the FreeBSD driver is even worse; I've been trying to get more than a gigabit of bandwidth on OPNsense for weeks, and the only advice I find is to do PCI passthrough while my linux VMs do 10GbE effortlessly. ๐Ÿ˜ข
@imil I donโ€™t have an immediate answer, but if you want I can help you debug this next week. Are you on some Matrix channel? Iโ€™m in #libkrun:matrix.org

@slp starting qemu with -trace 'virtio_serial_*' I see what's happening: qemu asks for ports add before the kernel starts:

$ qemu-system-x86_64 <params> -trace 'virtio_serial_*'
char device redirected to /dev/pts/36 (label viocon1)
virtio_serial_send_control_event port 0, event 6, value 1
virtio_serial_send_control_event port 0, event 1, value 1
virtio_serial_send_control_event port 1, event 6, value 1
virtio_serial_send_control_event port 1, event 1, value 1
[kernel starts]

I was in the impression qemu had to wait for a VIRTIO_CONSOLE_DEVICE_READY before sending a VIRTIO_CONSOLE_PORT_{ADD,OPEN}

@slp I'm not in Matrix but this is easily solvable ;)