aboutsummaryrefslogtreecommitdiffstats
path: root/hw/vga-pci.c
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2010-11-17 12:06:44 +0100
committerAnthony Liguori <aliguori@us.ibm.com>2010-11-21 09:16:57 -0600
commit281a26b15b4adcecb8604216738975abd754bea8 (patch)
tree3354e6cb7db8f04e83777ea1a61b113125a92aa0 /hw/vga-pci.c
parentc1ded3dc9f2d6caeb62eb3005510837a62b795d2 (diff)
vgabios update: handle compatibility with older qemu versions
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 Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/vga-pci.c')
-rw-r--r--hw/vga-pci.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/hw/vga-pci.c b/hw/vga-pci.c
index b09789cd1..791ca2276 100644
--- a/hw/vga-pci.c
+++ b/hw/vga-pci.c
@@ -92,6 +92,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;
}