aboutsummaryrefslogtreecommitdiff
path: root/include/hw
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2024-05-16 12:40:22 +0400
committerFabiano Rosas <farosas@suse.de>2024-05-22 17:34:41 -0300
commit40a23ef643664b5c1021a9789f9d680b6294fb50 (patch)
tree91af1e50c0bb69bf2b4792698b4cd6c698ebfaec /include/hw
parentf0937ec669f9f39f5ece39f62d048606b9ee3877 (diff)
downloadqemu-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 'include/hw')
-rw-r--r--include/hw/virtio/virtio-gpu.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/hw/virtio/virtio-gpu.h b/include/hw/virtio/virtio-gpu.h
index 56d6e82..7a59379 100644
--- a/include/hw/virtio/virtio-gpu.h
+++ b/include/hw/virtio/virtio-gpu.h
@@ -177,6 +177,7 @@ typedef struct VGPUDMABuf {
struct VirtIOGPU {
VirtIOGPUBase parent_obj;
+ uint8_t scanout_vmstate_version;
uint64_t conf_max_hostmem;
VirtQueue *ctrl_vq;