qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [7140] vga: Fix inconsistent tracking of map_addr (Jan Kiszka)
@ 2009-04-17 14:26 Anthony Liguori
  0 siblings, 0 replies; only message in thread
From: Anthony Liguori @ 2009-04-17 14:26 UTC (permalink / raw)
  To: qemu-devel

Revision: 7140
          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=7140
Author:   aliguori
Date:     2009-04-17 14:26:37 +0000 (Fri, 17 Apr 2009)
Log Message:
-----------
vga: Fix inconsistent tracking of map_addr (Jan Kiszka)

Only track video RAM mapping in map_addr and use the correct RAM size.
Furthermore, make sure the reset the address in case unmapping took
place via PCI reconfiguration.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

Modified Paths:
--------------
    trunk/hw/vga.c

Modified: trunk/hw/vga.c
===================================================================
--- trunk/hw/vga.c	2009-04-17 14:26:33 UTC (rev 7139)
+++ trunk/hw/vga.c	2009-04-17 14:26:37 UTC (rev 7140)
@@ -2258,12 +2258,10 @@
         cpu_register_physical_memory(addr, s->bios_size, s->bios_offset);
     } else {
         cpu_register_physical_memory(addr, s->vram_size, s->vram_offset);
+        s->map_addr = addr;
+        s->map_end = addr + s->vram_size;
+        vga_dirty_log_start(s);
     }
-
-    s->map_addr = addr;
-    s->map_end = addr + VGA_RAM_SIZE;
-
-    vga_dirty_log_start(s);
 }
 
 void vga_common_init(VGAState *s, int vga_ram_size)
@@ -2493,6 +2491,8 @@
 
     vga_dirty_log_stop(s);
     pci_default_write_config(d, address, val, len);
+    if (s->map_addr && pvs->dev.io_regions[0].addr == -1)
+        s->map_addr = 0;
     vga_dirty_log_start(s);
 }
 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-04-17 14:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-17 14:26 [Qemu-devel] [7140] vga: Fix inconsistent tracking of map_addr (Jan Kiszka) Anthony Liguori

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).