diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2016-05-23 15:22:07 +0200 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2016-06-06 09:04:34 +0200 |
commit | 0c244e50ee12311037efd507ee37df0e846e4a18 (patch) | |
tree | 6122f7c296e79cbe6f4b327018b80e154c6f42b2 /hw/display/virtio-vga.c | |
parent | 4e68a0ee17dad7b8d870df0081d4ab2e079016c2 (diff) |
virtio-gpu: add live migration support
Store some additional state for cursor and resource backing storage,
so we can write out and reload things. Implement vmsave+vmload for
2d mode. Continue blocking live migration in 3d/virgl mode.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-id: 1464009727-7753-1-git-send-email-kraxel@redhat.com
Diffstat (limited to 'hw/display/virtio-vga.c')
-rw-r--r-- | hw/display/virtio-vga.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/hw/display/virtio-vga.c b/hw/display/virtio-vga.c index f49f8deee7..315b7fc58c 100644 --- a/hw/display/virtio-vga.c +++ b/hw/display/virtio-vga.c @@ -84,6 +84,17 @@ static const GraphicHwOps virtio_vga_ops = { .gl_block = virtio_vga_gl_block, }; +static const VMStateDescription vmstate_virtio_vga = { + .name = "virtio-vga", + .version_id = 2, + .minimum_version_id = 2, + .fields = (VMStateField[]) { + /* no pci stuff here, saving the virtio device will handle that */ + VMSTATE_STRUCT(vga, VirtIOVGA, 0, vmstate_vga_common, VGACommonState), + VMSTATE_END_OF_LIST() + } +}; + /* VGA device wrapper around PCI device around virtio GPU */ static void virtio_vga_realize(VirtIOPCIProxy *vpci_dev, Error **errp) { @@ -168,6 +179,7 @@ static void virtio_vga_class_init(ObjectClass *klass, void *data) set_bit(DEVICE_CATEGORY_DISPLAY, dc->categories); dc->props = virtio_vga_properties; dc->reset = virtio_vga_reset; + dc->vmsd = &vmstate_virtio_vga; dc->hotpluggable = false; k->realize = virtio_vga_realize; |