From 1fcfdc435a3e25ab9037f6f7b8ab4bdf89ba1269 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Mon, 2 Jul 2018 18:33:44 +0200 Subject: vga: disable global_vmstate for 3.0+ machine types Move global_vmstate from vga_common_init() parameter to VGACommonState field. Set global_vmstate to true for isa vga devices, so nothing changes here. virtio-vga and secondary-vga already set global_vmstate to false so no change here either. All other pci vga devices get a new global-vmstate property, defaulting to false. A compat property flips it to true for older machine types. With this in place you don't get a vmstate section naming conflict any more when adding multiple pci vga devices to your vm. Signed-off-by: Gerd Hoffmann Message-Id: <20180702163345.17892-1-kraxel@redhat.com> --- include/hw/compat.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'include/hw') diff --git a/include/hw/compat.h b/include/hw/compat.h index 44d5964060..c08f4040bb 100644 --- a/include/hw/compat.h +++ b/include/hw/compat.h @@ -10,6 +10,22 @@ .driver = "hda-audio",\ .property = "use-timer",\ .value = "false",\ + },{\ + .driver = "cirrus-vga",\ + .property = "global-vmstate",\ + .value = "true",\ + },{\ + .driver = "VGA",\ + .property = "global-vmstate",\ + .value = "true",\ + },{\ + .driver = "vmware-svga",\ + .property = "global-vmstate",\ + .value = "true",\ + },{\ + .driver = "qxl-vga",\ + .property = "global-vmstate",\ + .value = "true",\ }, #define HW_COMPAT_2_11 \ -- cgit v1.2.3