> > diff --git a/hw/display/vga-pci.c b/hw/display/vga-pci.c > > index b3a45c8..dee180f 100644 > > --- a/hw/display/vga-pci.c > > +++ b/hw/display/vga-pci.c > > @@ -147,7 +147,7 @@ static int pci_std_vga_initfn(PCIDevice *dev) > > VGACommonState *s = &d->vga; > > > > /* vga + console init */ > > - vga_common_init(s, OBJECT(dev)); > > + vga_common_init(s, OBJECT(dev), true);
> > -void vga_common_init(VGACommonState *s, Object *obj) > > +void vga_common_init(VGACommonState *s, Object *obj, bool global_vmstate) > > - vmstate_register_ram_global(&s->vram); > > + vmstate_register_ram(&s->vram, global_vmstate ? NULL : DEVICE(obj)); > > > > Is it possible to do it depending of the QEMU compatibility version, or > of some property, so we don't have to keep this global vmstate forever? Sure. We can easily add a property to stdvga, then make the new vga_common_init paramater depend on the property. > With this, I think we can also expect to be able to specify "-device > VGA" twice, and see the BIOS messages on one card or another. It would get us a step closer, but the two vga cards would still compete for the legacy vga io ports at 0x3c0. Thats why there is patch #2 of this series, which adds a stdvga variant not allocating legacy ports, so it can be added without port conflicts. cheers, Gerd