vga: disable global_vmstate for 3.0+ machine types
commit1fcfdc435a3e25ab9037f6f7b8ab4bdf89ba1269
authorGerd Hoffmann <kraxel@redhat.com>
Mon, 2 Jul 2018 16:33:44 +0000 (2 18:33 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Tue, 3 Jul 2018 09:19:49 +0000 (3 11:19 +0200)
tree847436a641f4365a151eb77405fa106fb0b62f5b
parent1fccd7c5a9a722a9cbf1bc91693f4618034f01ac
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 <kraxel@redhat.com>
Message-Id: <20180702163345.17892-1-kraxel@redhat.com>
hw/display/cirrus_vga.c
hw/display/qxl.c
hw/display/vga-isa-mm.c
hw/display/vga-isa.c
hw/display/vga-pci.c
hw/display/vga.c
hw/display/vga_int.h
hw/display/virtio-vga.c
hw/display/vmware_vga.c
include/hw/compat.h