]> xenbits.xensource.com Git - qemu-xen.git/commit
virtio: new post_load hook
authorMichael S. Tsirkin <mst@redhat.com>
Fri, 11 Oct 2019 13:58:03 +0000 (15:58 +0200)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Mon, 4 Nov 2019 14:23:53 +0000 (08:23 -0600)
commit8010d3fce008dd13f155bc0babfe236ea44a2712
treea68654bb090e447f0b67fb7ec5b9fb117a81c614
parent6705b9344f8d6f134f612c2e35e87cdda5aa6284
virtio: new post_load hook

Post load hook in virtio vmsd is called early while device is processed,
and when VirtIODevice core isn't fully initialized.  Most device
specific code isn't ready to deal with a device in such state, and
behaves weirdly.

Add a new post_load hook in a device class instead.  Devices should use
this unless they specifically want to verify the migration stream as
it's processed, e.g. for bounds checking.

Cc: qemu-stable@nongnu.org
Suggested-by: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
Cc: Mikhail Sennikovsky <mikhail.sennikovskii@cloud.ionos.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
(cherry picked from commit 1dd713837cac8ec5a97d3b8492d72ce5ac94803c)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
hw/virtio/virtio.c
include/hw/virtio/virtio.h