qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: Gerd Hoffmann <kraxel@redhat.com>, avi@redhat.com
Subject: [Qemu-devel] [PATCH] vgabios update: handle compatibility with older qemu versions
Date: Wed, 17 Nov 2010 12:06:44 +0100	[thread overview]
Message-ID: <1289992004-6291-1-git-send-email-kraxel@redhat.com> (raw)

As pointed out by avi the vgabios update is guest-visible and thus has
migration implications.

One change is that the vga has a valid pci rom bar now.  We already have
a pci bus property to enable/disable the rom bar and we'll load the bios
via fw_cfg as fallback for the no-rom-bar case.  So we just have to add
compat properties to handle this case.

A second change is that the magic bochs lfb @ 0xe0000000 is gone.  When
live-migrating a guest from a older qemu version it might be using the
lfb though, so we have to keep it for the old machine types.  The patch
enables the bochs lfb in case we don't have the pci rom bar enabled
(i.e. we are in 0.13+older compat mode).

This patch depends on these patches which add (and use) the pc-0.13
machine type:
  http://patchwork.ozlabs.org/patch/70797/
  http://patchwork.ozlabs.org/patch/70798/

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Cc: avi@redhat.com
---
 hw/pc_piix.c    |   16 ++++++++++++++++
 hw/vga-pci.c    |    5 +++++
 hw/vmware_vga.c |    5 +++++
 3 files changed, 26 insertions(+), 0 deletions(-)

diff --git a/hw/pc_piix.c b/hw/pc_piix.c
index e9752db..a85d58e 100644
--- a/hw/pc_piix.c
+++ b/hw/pc_piix.c
@@ -231,6 +231,14 @@ static QEMUMachine pc_machine_v0_13 = {
             .driver   = "virtio-9p-pci",
             .property = "vectors",
             .value    = stringify(0),
+        },{
+            .driver   = "VGA",
+            .property = "rombar",
+            .value    = stringify(0),
+        },{
+            .driver   = "vmware-svga",
+            .property = "rombar",
+            .value    = stringify(0),
         },
         { /* end of list */ }
     },
@@ -250,6 +258,14 @@ static QEMUMachine pc_machine_v0_12 = {
             .driver   = "virtio-serial-pci",
             .property = "vectors",
             .value    = stringify(0),
+        },{
+            .driver   = "VGA",
+            .property = "rombar",
+            .value    = stringify(0),
+        },{
+            .driver   = "vmware-svga",
+            .property = "rombar",
+            .value    = stringify(0),
         },
         { /* end of list */ }
     }
diff --git a/hw/vga-pci.c b/hw/vga-pci.c
index 28b174b..4931eee 100644
--- a/hw/vga-pci.c
+++ b/hw/vga-pci.c
@@ -96,6 +96,11 @@ static int pci_vga_initfn(PCIDevice *dev)
      pci_register_bar(&d->dev, 0, VGA_RAM_SIZE,
                       PCI_BASE_ADDRESS_MEM_PREFETCH, vga_map);
 
+     if (!dev->rom_bar) {
+         /* compatibility with pc-0.13 and older */
+         vga_init_vbe(s);
+     }
+
      return 0;
 }
 
diff --git a/hw/vmware_vga.c b/hw/vmware_vga.c
index e96b7db..e852620 100644
--- a/hw/vmware_vga.c
+++ b/hw/vmware_vga.c
@@ -1305,6 +1305,11 @@ static int pci_vmsvga_initfn(PCIDevice *dev)
 
     vmsvga_init(&s->chip, VGA_RAM_SIZE);
 
+    if (!dev->rom_bar) {
+        /* compatibility with pc-0.13 and older */
+        vga_init_vbe(&s->chip.vga);
+    }
+
     return 0;
 }
 
-- 
1.7.1

             reply	other threads:[~2010-11-17 11:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-17 11:06 Gerd Hoffmann [this message]
2010-11-21 15:18 ` [Qemu-devel] [PATCH] vgabios update: handle compatibility with older qemu versions Anthony Liguori

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=1289992004-6291-1-git-send-email-kraxel@redhat.com \
    --to=kraxel@redhat.com \
    --cc=avi@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).