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

Gerd Hoffmann a écrit :
> Need a way to opt-out from vga.vram being global vmstate, for
> secondary vga cards.  Add a bool parameter to vga_common_init
> to support this.
>
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
>  hw/display/cirrus_vga.c | 4 ++--
>  hw/display/qxl.c        | 2 +-
>  hw/display/vga-isa-mm.c | 2 +-
>  hw/display/vga-isa.c    | 2 +-
>  hw/display/vga-pci.c    | 2 +-
>  hw/display/vga.c        | 4 ++--
>  hw/display/vga_int.h    | 2 +-
>  hw/display/vmware_vga.c | 2 +-
>  8 files changed, 10 insertions(+), 10 deletions(-)
>
>   
[...]

> 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);
>      vga_init(s, OBJECT(dev), pci_address_space(dev), pci_address_space_io(dev),
>               true);
>  
> diff --git a/hw/display/vga.c b/hw/display/vga.c
> index 7b91d9c..fea30e5 100644
> --- a/hw/display/vga.c
> +++ b/hw/display/vga.c
> @@ -2257,7 +2257,7 @@ static const GraphicHwOps vga_ops = {
>      .text_update = vga_update_text,
>  };
>  
> -void vga_common_init(VGACommonState *s, Object *obj)
> +void vga_common_init(VGACommonState *s, Object *obj, bool global_vmstate)
>  {
>      int i, j, v, b;
>  
> @@ -2294,7 +2294,7 @@ void vga_common_init(VGACommonState *s, Object *obj)
>  
>      s->is_vbe_vmstate = 1;
>      memory_region_init_ram(&s->vram, obj, "vga.vram", s->vram_size);
> -    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?
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.

Hervé

  reply	other threads:[~2013-10-24  7:46 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 [this message]
2013-10-24  9:15     ` Gerd Hoffmann
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=5268D04D.7090900@reactos.org \
    --to=hpoussin@reactos.org \
    --cc=kraxel@redhat.com \
    --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).