aboutsummaryrefslogtreecommitdiff
path: root/hw/display/vga-isa.c
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2018-07-02 18:33:44 +0200
committerGerd Hoffmann <kraxel@redhat.com>2018-07-03 11:19:49 +0200
commit1fcfdc435a3e25ab9037f6f7b8ab4bdf89ba1269 (patch)
tree847436a641f4365a151eb77405fa106fb0b62f5b /hw/display/vga-isa.c
parent1fccd7c5a9a722a9cbf1bc91693f4618034f01ac (diff)
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>
Diffstat (limited to 'hw/display/vga-isa.c')
-rw-r--r--hw/display/vga-isa.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/display/vga-isa.c b/hw/display/vga-isa.c
index 469834add5..fa44242e0d 100644
--- a/hw/display/vga-isa.c
+++ b/hw/display/vga-isa.c
@@ -58,7 +58,8 @@ static void vga_isa_realizefn(DeviceState *dev, Error **errp)
MemoryRegion *vga_io_memory;
const MemoryRegionPortio *vga_ports, *vbe_ports;
- vga_common_init(s, OBJECT(dev), true);
+ s->global_vmstate = true;
+ vga_common_init(s, OBJECT(dev));
s->legacy_address_space = isa_address_space(isadev);
vga_io_memory = vga_init_io(s, OBJECT(dev), &vga_ports, &vbe_ports);
isa_register_portio_list(isadev, &d->portio_vga,