On Thu, 2016-08-18 at 08:38 +0200, Andrew Jones wrote: > > > Finally, FWIW, with a guest kernel of 4.6.4-301.fc24.aarch64. The > > > following qemu command line works for me. > > > (notice the use of PCIe), and my network interface gets labeled enp0s1. > > > > > > $QEMU -machine virt-2.6,accel=kvm -cpu host \ > > > -m 1024 -smp 1 -nographic \ > > > -bios /usr/share/AAVMF/AAVMF_CODE.fd \ > > > -device ioh3420,bus=pcie.0,id=pcie.1,port=1,chassis=1 \ > > > -device ioh3420,bus=pcie.0,id=pcie.2,port=2,chassis=2 \ > > > -device > > >virtio-scsi-pci,disable-modern=off,disable-legacy=on,bus=pcie.1,addr=00.0,id=scsi0 > > > \ > > > -drive > > >file=/home/drjones/.local/libvirt/images/fedora.qcow2,format=qcow2,if=none,id=drive-scsi0-0-0-0 > > > \ > > > -device > > >scsi-hd,bus=scsi0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0-0-0-0,id=scsi0-0-0-0,bootindex=1 > > > \ > > > -netdev user,id=hostnet0 \ > > > -device > > >virtio-net-pci,disable-modern=off,disable-legacy=on,bus=pcie.2,addr=00.0,netdev=hostnet0,id=net0 > > > > > > I prefer always using virtio-scsi for the disk, but a similar command > > > line can be used for a virtio-blk-pci disk. > > > > Does the same command line work if you don't specify any of > > the disable-* options? > > > > I'm asking because I tried running a Fedora 24 guest through > > libvirt, which doesn't support those options yet, and I get > > > > virtio_blk virtio2: virtio: device uses modern interface but > > does not have VIRTIO_F_VERSION_1 > > virtio_blk: probe of virtio2 failed with error -22 > > Doesn't work for me either. I can only boot with disable-modern=off, > disable-legacy=on (at least when building my config the way I try to > build it...) I presume that's a guest kernel issue.
I tried Fedora 24 and Debian testing, and for both of them the result is the same: I can only boot the guest if I'm setting up a legacy-free PCIe topology and use virt-2.7 to obtain virtio-1.0 devices (see below); for every other permutation of { PCI topology, PCIe topology } x { virt-2.6, virt-2.7 } the guest doesn't boot at all. On the other hand, a RHEL 7.3 guest was able to boot *every single time*, even though the result was in some cases quite questionable (eg. legacy PCI devices plugged into ioh3420 ports). > > Isn't the default for 2.6 disable-modern=off, > > disable-legacy=off? Or was that 2.7? I tried both anyway ;) > > Dunno. With the command line getting longer all the time, I just > have a script that generates one that works for me, and haven't > worried much about the defaults... So I thought the default for 2.6 was supposed to be disable-modern=off,disable-legacy=off [0.9+1.0] but it turns out it's actually disable-modern=on,disable-legacy=off [0.9] whereas the default for 2.7 is disable-modern=off,disable-legacy=on [1.0] Is the idea that there would be a QEMU release with both 0.9 and 1.0 enabled by default something that I just imagined? Or did the plan just change at some point? -- Andrea Bolognani / Red Hat / Virtualization