virtio is broken in qemu-system-arm

Host environment

  • Operating system: linux
  • OS/kernel version: Linux bookworm 6.1.0-16-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.67-1 (2023-12-12) x86_64 GNU/Linux
  • Architecture: x86_64
  • QEMU flavor: qemu-system-arm
  • QEMU version: 8.2.0
  • QEMU command line: qemu-system-arm -smp 2 -cpu max -machine type=virt -drive file=linux.ext4,if=virtio -kernel vmlinuz -initrd initrd -nographic

Emulated/Virtualized environment

  • Operating system: linux
  • OS/kernel version: debian 6.1.0-16
  • Architecture: armel, armhf

With this setup, guest does not see any virtio devices at all (in this case: virtio-blk).

Bisect points to v8.1.0-228-gb8f7959f. After reverting this commit on top of 8.2.0, virtio devices start showing up again:

Loading, please wait...
Starting systemd-udevd version 255-1
[    6.455941] virtio-pci 0000:00:01.0: enabling device (0100 -> 0103)
[    6.929155] virtio-pci 0000:00:02.0: enabling device (0100 -> 0103)
[    7.764652] virtio_blk virtio1: 2/0/0 default/read/poll queues
[    7.783216] virtio_blk virtio1: [vda] 2097026 512-byte logical blocks (1.07 GB/1024 MiB)
[    8.636453] virtio_net virtio0 enp0s1: renamed from eth0

With that commit applied, no virtio-related messages from the kernel are seen at all.

Original qemu-devel report: https://lore.kernel.org/qemu-devel/87a5q3z05l.fsf@draig.linaro.org/T/#t

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information