Dave Gilbert hit the following virtio migration error message today and asked me if it was a known bug: virtio-rng: VQ 0 size 0x8 < last_avail_idx 0x21 - used_idx 0x22
It looks like a legitimate new bug. This error occurred with postcopy live migration and no rng backend (just -device virtio-rng-pci). The virtio-rng code uses rng_backend_request_entropy(). Is the async callback safe with live migration? It should not fire after vm_stop() on the source host. Looking briefly at the code suggests it may fire during/after migration handover. This could lead to inconsistent virtio state since the vring (guest RAM) is modified by the source host and the postcopy destination host may load those updated values. Stefan