I'm running a lot of qemu + kvm + seabios VMs and after upgrade to Debian 9 I found that some of them stopped booting. After trying to change kernel/qemu/seabios versions, I've nailed down the cause to the following:
# VM definition qemu-system-x86_64 \ -enable-kvm \ -machine q35 \ -m 512 \ -nodefaults \ -cpu host \ -smp 1,sockets=1,cores=1,threads=1 \ -bios /opt/seabios/out/bios.bin \ -device virtio-scsi-pci,id=scsi \ -drive file="disk.img",id=disk,format=raw,if=none,cache=unsafe,aio=threads \ -device scsi-hd,drive=disk,bus=scsi.0,removable=off \ -device virtio-net-pci,netdev=net0,mac=$("../qemu-mac-hasher.py" "test") \ -netdev tap,id=net0,script="../ifup.sh",downscript="../ifdown.sh" \ -chardev stdio,id=seabios -device isa-debugcon,iobase=0x402,chardev=seabios \ -vga none \ -nographic
This VM doesn't boot with modern seabios, but it used to work. And now, if I change 'vga none' to 'vga std' in it, it starts booting again. I've performed git bisect on the seabios repository and found the following commit to break the old setup:
1d9e87b937d646be1950695f9ead35100d5ebbe6 is the first bad commit commit 1d9e87b937d646be1950695f9ead35100d5ebbe6 Author: Gerd Hoffmann kraxel@redhat.com Date: Fri Jun 26 09:44:00 2015 +0200
virtio: run drivers in 32bit mode
virtio version 1.0 registers can (and actually do in the qemu implementation) live in mmio space. So we must run the blk and scsi virtio drivers in 32bit mode, otherwise we can't access them.
This also allows to drop a bunch of GET_LOWFLAT calls from the virtio code in the following patches.
Signed-off-by: Gerd Hoffmann kraxel@redhat.com
:100644 100644 f97b1bd9f91df7417e7bd5a1ebd7182098a43296 e287530d0008e1d876a0bb9f9ff8a43266d7e1bd M Makefile :040000 040000 70b419ced4f58a39143c92897097a08b5548cbf4 93f7d4d939b5e0a14102a3cb718b1be5a2f12e60 M src
Here're links to a full successful boot log (with 'vga std') and some portion of a failing boot log (as it just loops eternally):
https://gist.github.com/dur-randir/80b7d9a84cbdb8591ec05abe2fc62604 https://gist.github.com/dur-randir/52c31d2abe3150759abd3e8ca140959a
Those logs were obtained from seabios 1d9e87b937 - the first broken revision, but I can provide them for master, as it's still broken.
Best regards, Sergey Aleyinkov