From a6df8adf3edbb3062f087e425564df35077e8410 Mon Sep 17 00:00:00 2001 From: Jason Wang Date: Fri, 6 Nov 2015 16:02:44 +0800 Subject: virtio-pci: fix 1.0 virtqueue migration We don't migrate the followings fields for virtio-pci: uint32_t dfselect; uint32_t gfselect; uint32_t guest_features[2]; struct { uint16_t num; bool enabled; uint32_t desc[2]; uint32_t avail[2]; uint32_t used[2]; } vqs[VIRTIO_QUEUE_MAX]; This will confuse driver if migrating during initialization. Solves this issue by: - introduce transport specific callbacks to load and store extra virtqueue states. - add a new subsection for virtio to migrate transport specific modern device state. - implement pci specific callbacks. - add a new property for virtio-pci for whether or not to migrate extra state. - compat the migration for 2.4 and elder machine types Cc: Michael S. Tsirkin Signed-off-by: Jason Wang Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Cornelia Huck --- include/hw/compat.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include/hw/compat.h') diff --git a/include/hw/compat.h b/include/hw/compat.h index 93e71afb4a..65799c1868 100644 --- a/include/hw/compat.h +++ b/include/hw/compat.h @@ -6,6 +6,10 @@ .driver = "virtio-blk-device",\ .property = "scsi",\ .value = "true",\ + },{\ + .driver = "virtio-pci",\ + .property = "migrate-extra",\ + .value = "off",\ }, #define HW_COMPAT_2_3 \ -- cgit v1.2.3-55-g7522