aboutsummaryrefslogtreecommitdiff
path: root/hw/display/vga_int.h
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_int.h
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_int.h')
-rw-r--r--hw/display/vga_int.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/display/vga_int.h b/hw/display/vga_int.h
index f8fcf62a56..339661bc01 100644
--- a/hw/display/vga_int.h
+++ b/hw/display/vga_int.h
@@ -133,6 +133,7 @@ typedef struct VGACommonState {
bool full_update_gfx;
bool big_endian_fb;
bool default_endian_fb;
+ bool global_vmstate;
/* hardware mouse cursor support */
uint32_t invalidated_y_table[VGA_MAX_HEIGHT / 32];
uint32_t hw_cursor_x;
@@ -157,7 +158,7 @@ static inline int c6_to_8(int v)
return (v << 2) | (b << 1) | b;
}
-void vga_common_init(VGACommonState *s, Object *obj, bool global_vmstate);
+void vga_common_init(VGACommonState *s, Object *obj);
void vga_init(VGACommonState *s, Object *obj, MemoryRegion *address_space,
MemoryRegion *address_space_io, bool init_vga_ports);
MemoryRegion *vga_init_io(VGACommonState *s, Object *obj,