diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2024-05-16 12:40:22 +0400 |
---|---|---|
committer | Fabiano Rosas <farosas@suse.de> | 2024-05-22 17:34:41 -0300 |
commit | 40a23ef643664b5c1021a9789f9d680b6294fb50 (patch) | |
tree | 91af1e50c0bb69bf2b4792698b4cd6c698ebfaec /hw/core | |
parent | f0937ec669f9f39f5ece39f62d048606b9ee3877 (diff) | |
download | qemu-40a23ef643664b5c1021a9789f9d680b6294fb50.zip qemu-40a23ef643664b5c1021a9789f9d680b6294fb50.tar.gz qemu-40a23ef643664b5c1021a9789f9d680b6294fb50.tar.bz2 |
virtio-gpu: fix v2 migration
Commit dfcf74fa ("virtio-gpu: fix scanout migration post-load") broke
forward/backward version migration. Versioning of nested VMSD structures
is not straightforward, as the wire format doesn't have nested
structures versions. Introduce x-scanout-vmstate-version and a field
test to save/load appropriately according to the machine version.
Fixes: dfcf74fa ("virtio-gpu: fix scanout migration post-load")
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Fiona Ebner <f.ebner@proxmox.com>
Tested-by: Fiona Ebner <f.ebner@proxmox.com>
[fixed long lines]
Signed-off-by: Fabiano Rosas <farosas@suse.de>
Diffstat (limited to 'hw/core')
-rw-r--r-- | hw/core/machine.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/core/machine.c b/hw/core/machine.c index c7ceb11..8d6dc69 100644 --- a/hw/core/machine.c +++ b/hw/core/machine.c @@ -42,6 +42,7 @@ GlobalProperty hw_compat_8_2[] = { { "migration", "zero-page-detection", "legacy"}, { TYPE_VIRTIO_IOMMU_PCI, "granule", "4k" }, { TYPE_VIRTIO_IOMMU_PCI, "aw-bits", "64" }, + { "virtio-gpu-device", "x-scanout-vmstate-version", "1" }, }; const size_t hw_compat_8_2_len = G_N_ELEMENTS(hw_compat_8_2); |