Jens Freimann <jfreim...@redhat.com> writes: > On Fri, Apr 05, 2019 at 09:56:29AM +0100, Dr. David Alan Gilbert wrote: >>* Jens Freimann (jfreim...@redhat.com) wrote: > [...] >>> > Commandline: There is a dependency between vfio-pci and virtio-net >>> > devices. One points to the other via new parameters >>> > primar=<primary qdev id> and standby='<standby qdev id>'. This means >>> > that the primary device needs to be specified after standby device on >>> > the qemu command line. Not sure how to solve this. >>> > >>> > Error handling: Patches don't cover all possible error scenarios yet. >>> > >>> > I have tested this with a mlx5 NIC and was able to migrate the VM with >>> > above mentioned workarounds for open problems. >>> > >>> > Command line example: >>> > >>> > qemu-system-x86_64 -enable-kvm -m 3072 -smp 3 \ >>> > -machine q35,kernel-irqchip=split -cpu host \ >>> > -k fr \ >>> > -serial stdio \ >>> > -net none \ >>> > -qmp unix:/tmp/qmp.socket,server,nowait \ >>> > -monitor telnet:127.0.0.1:5555,server,nowait \ >>> > -device >>> > pcie-root-port,id=root0,multifunction=on,chassis=0,addr=0xa \ >>> > -device pcie-root-port,id=root1,bus=pcie.0,chassis=1 \ >>> > -device pcie-root-port,id=root2,bus=pcie.0,chassis=2 \ >>> > -netdev >>> > tap,script=/root/bin/bridge.sh,downscript=no,id=hostnet1,vhost=on \ >>> > -device >>> > virtio-net-pci,netdev=hostnet1,id=net1,mac=52:54:00:6f:55:cc,bus=root2,primary=hostdev0 >>> > \ >>> > -device vfio-pci,host=5e:00.2,id=hostdev0,bus=root1,standby=net1 \ >> >>Yes, that's a bit grim; it's circular dependency on the 'hostdev0' and >>'net1' id's. cc'ing in Markus. > > Dan had an idea how to avoid having to specify the id for the > virtio-net device. I'm currently looking into it, but it seems like it > should work.
Excellent. A circular dependency between -device could only lead to trouble.