[v3,2/4] switch stdvga to pci vgabios

Submitted by Gerd Hoffmann on Nov. 3, 2010, 11:56 a.m.

Details

Message ID 1288785372-17514-3-git-send-email-kraxel@redhat.com
State New
Headers show

Commit Message

Gerd Hoffmann Nov. 3, 2010, 11:56 a.m.
Make stdvga provide the new vgabios binary (with pcibios support)
using the PCI option rom bar.  Seabios will happily load it from
there.  The new vga bios will also lookup the framebuffer address
in pci config space, so the magic bochs lfb @ 0xe0000000 is not
needed any more -> zap it.

Without the patch:

  # dmesg | grep framebuffer
  vesafb: framebuffer at 0xe0000000, mapped to 0xf7e80000, using 1875k, total 8192k
  # lspci -vs2
  00:02.0 VGA compatible controller: Technical Corp. Device 1111 (prog-if 00 [VGA controller])
	Subsystem: Qumranet, Inc. Device 1100
	Physical Slot: 2
	Flags: fast devsel
	Memory at f0000000 (32-bit, prefetchable) [size=8M]
	Expansion ROM at <unassigned> [disabled]

With patch applied:

  # dmesg | grep framebuffer
  vesafb: framebuffer at 0xf0000000, mapped to 0xf7e80000, using 1875k, total 8192k
  # lspci -vs2
  00:02.0 VGA compatible controller: Technical Corp. Device 1111 (prog-if 00 [VGA controller])
	Subsystem: Qumranet, Inc. Device 1100
	Physical Slot: 2
	Flags: fast devsel
	Memory at f0000000 (32-bit, prefetchable) [size=8M]
	Expansion ROM at f0800000 [disabled] [size=64K]

cheers,
  Gerd

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 hw/vga-pci.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

Comments

Avi Kivity Nov. 17, 2010, 9:42 a.m.
On 11/03/2010 01:56 PM, Gerd Hoffmann wrote:
> Make stdvga provide the new vgabios binary (with pcibios support)
> using the PCI option rom bar.  Seabios will happily load it from
> there.  The new vga bios will also lookup the framebuffer address
> in pci config space, so the magic bochs lfb @ 0xe0000000 is not
> needed any more ->  zap it.
>
> Without the patch:
>
>    # dmesg | grep framebuffer
>    vesafb: framebuffer at 0xe0000000, mapped to 0xf7e80000, using 1875k, total 8192k
>    # lspci -vs2
>    00:02.0 VGA compatible controller: Technical Corp. Device 1111 (prog-if 00 [VGA controller])
> 	Subsystem: Qumranet, Inc. Device 1100
> 	Physical Slot: 2
> 	Flags: fast devsel
> 	Memory at f0000000 (32-bit, prefetchable) [size=8M]
> 	Expansion ROM at<unassigned>  [disabled]
>
> With patch applied:
>
>    # dmesg | grep framebuffer
>    vesafb: framebuffer at 0xf0000000, mapped to 0xf7e80000, using 1875k, total 8192k
>    # lspci -vs2
>    00:02.0 VGA compatible controller: Technical Corp. Device 1111 (prog-if 00 [VGA controller])
> 	Subsystem: Qumranet, Inc. Device 1100
> 	Physical Slot: 2
> 	Flags: fast devsel
> 	Memory at f0000000 (32-bit, prefetchable) [size=8M]
> 	Expansion ROM at f0800000 [disabled] [size=64K]
>

This is a guest visible change... does it need -M 0.13 support?  Will 
live migration from 0.13 to 0.14 work?
Gerd Hoffmann Nov. 17, 2010, 10 a.m.
Hi,

> This is a guest visible change... does it need -M 0.13 support?

Yes, it will.  I have a patch in flight which actually adds the 0.13 
machine type, when this is merged I can add compat properties to handle 
this.

 > Will
 > live migration from 0.13 to 0.14 work?

Hmm.  Guess we probably have to keep the magic framebuffer @ 0xe0000000 
for -M pc-0.13 to make migration work.

cheers,
   Gerd

Patch hide | download patch | download mbox

diff --git a/hw/vga-pci.c b/hw/vga-pci.c
index 2315f70..eef0e3c 100644
--- a/hw/vga-pci.c
+++ b/hw/vga-pci.c
@@ -103,11 +103,10 @@  static int pci_vga_initfn(PCIDevice *dev)
             bios_total_size <<= 1;
         pci_register_bar(&d->dev, PCI_ROM_SLOT, bios_total_size,
                          PCI_BASE_ADDRESS_MEM_PREFETCH, vga_map);
+     } else {
+         if (dev->romfile == NULL)
+             dev->romfile = qemu_strdup("vgabios-stdvga.bin");
      }
-
-    vga_init_vbe(s);
-     /* ROM BIOS */
-     rom_add_vga(VGABIOS_FILENAME);
      return 0;
 }