From 4eccfec4943db1106c79a01069e18dd4f463219b Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Thu, 6 May 2010 11:14:11 +0200 Subject: switch vmware_vga to pci vgabios Signed-off-by: Gerd Hoffmann --- hw/vmware_vga.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'hw/vmware_vga.c') diff --git a/hw/vmware_vga.c b/hw/vmware_vga.c index 3d25c14da..9337fdbfe 100644 --- a/hw/vmware_vga.c +++ b/hw/vmware_vga.c @@ -114,14 +114,12 @@ struct pci_vmsvga_state_s { # define SVGA_IO_BASE SVGA_LEGACY_BASE_PORT # define SVGA_IO_MUL 1 # define SVGA_FIFO_SIZE 0x10000 -# define SVGA_MEM_BASE 0xe0000000 # define SVGA_PCI_DEVICE_ID PCI_DEVICE_ID_VMWARE_SVGA2 #else # define SVGA_ID SVGA_ID_1 # define SVGA_IO_BASE SVGA_LEGACY_BASE_PORT # define SVGA_IO_MUL 4 # define SVGA_FIFO_SIZE 0x10000 -# define SVGA_MEM_BASE 0xe0000000 # define SVGA_PCI_DEVICE_ID PCI_DEVICE_ID_VMWARE_SVGA #endif @@ -1219,10 +1217,6 @@ static void vmsvga_init(struct vmsvga_state_s *s, int vga_ram_size) vga_init(&s->vga); vmstate_register(NULL, 0, &vmstate_vga_common, &s->vga); - vga_init_vbe(&s->vga); - - rom_add_vga(VGABIOS_FILENAME); - vmsvga_reset(s); } @@ -1320,6 +1314,7 @@ static PCIDeviceInfo vmsvga_info = { .qdev.size = sizeof(struct pci_vmsvga_state_s), .qdev.vmsd = &vmstate_vmware_vga, .init = pci_vmsvga_initfn, + .romfile = "vgabios-vmware.bin", }; static void vmsvga_register(void) -- cgit v1.2.3 From 281a26b15b4adcecb8604216738975abd754bea8 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Wed, 17 Nov 2010 12:06:44 +0100 Subject: 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 Cc: avi@redhat.com Signed-off-by: Anthony Liguori --- hw/vmware_vga.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'hw/vmware_vga.c') diff --git a/hw/vmware_vga.c b/hw/vmware_vga.c index 9337fdbfe..d0f4e1b5b 100644 --- a/hw/vmware_vga.c +++ b/hw/vmware_vga.c @@ -1301,6 +1301,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; } -- cgit v1.2.3