On 11/08/2021 08:50, Michael S. Tsirkin wrote: > On Wed, Jul 21, 2021 at 06:09:05PM +0200, Laurent Vivier wrote: >> The intend of failover is to allow to migrate a VM with a VFIO >> networking card without disrupting the network operation by switching >> to a virtio-net device during the migration. >> >> This simple change allows to test failover with a simulated device >> like e1000e rather than a vfio device, even if it's useless in real >> life it can help to debug failover. >> >> This is interesting to developers that want to test failover on >> a system with no vfio device. Moreover it simplifies host networking >> configuration as we can use the same bridge for virtio-net and >> the other failover networking device. >> >> Without this change the migration of a system configured with failover >> fails with: >> >> ... >> -device virtio-net-pci,id=virtionet0,failover=on,... \ >> -device e1000,failover_pair_id=virtionet0,... \ >> ... >> >> (qemu) migrate ... >> >> Unknown ramblock "0000:00:01.1:00.0/e1000e.rom", cannot accept migration >> error while loading state for instance 0x0 of device 'ram' >> load of migration failed: Invalid argument >> >> This happens because QEMU correctly unregisters the interface vmstate but >> not the ROM one. This patch fixes that. >> >> Signed-off-by: Laurent Vivier <lviv...@redhat.com> > > I began to wonder about this. Why are we sending the option ROM at all? > I think there's no need to do it for the primary ...
I think there is no way to check the ROM is the same on source and destination, and it has to be. By sending the ROM: - we can check the size is the same, otherwise the migration fails, - after the migration, even if a different ROM was provided on the destination side, the guest executes the ROM provided by the source. Thanks, Laurent