qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: "Hervé Poussineau" <hpoussin@reactos.org>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 1/2] vga: allow non-global vmstate
Date: Thu, 24 Oct 2013 11:15:44 +0200	[thread overview]
Message-ID: <1382606144.3219.9.camel@nilsson.home.kraxel.org> (raw)
In-Reply-To: <5268D04D.7090900@reactos.org>

> > 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	other threads:[~2013-10-24  9:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-17 11:02 [Qemu-devel] [PATCH 0/2] vga: add secondary stdvga variant Gerd Hoffmann
2013-10-17 11:02 ` [Qemu-devel] [PATCH 1/2] vga: allow non-global vmstate Gerd Hoffmann
2013-10-24  7:46   ` Hervé Poussineau
2013-10-24  9:15     ` Gerd Hoffmann [this message]
2013-10-17 11:02 ` [Qemu-devel] [PATCH 2/2] vga: add secondary stdvga variant Gerd Hoffmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1382606144.3219.9.camel@nilsson.home.kraxel.org \
    --to=kraxel@redhat.com \
    --cc=hpoussin@reactos.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).