qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 1/2] vga: allow non-global vmstate


From: Gerd Hoffmann
Subject: Re: [Qemu-devel] [PATCH 1/2] vga: allow non-global vmstate
Date: Thu, 24 Oct 2013 11:15:44 +0200

> > 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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]