cirrus: Unbreak ISA support
authorJan Kiszka <jan.kiszka@siemens.com>
Wed, 21 Sep 2011 18:49:32 +0000 (20:49 +0200)
committerAnthony Liguori <aliguori@us.ibm.com>
Fri, 23 Sep 2011 15:55:33 +0000 (10:55 -0500)
Do not try to map against the PCI bar in the ISA version of the device.

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

index ec7ea8207b4a7f3c106affab0d4f44b9e695a893..c7e365b2a67ba2cb043065493f6712f4739d3d08 100644 (file)
@@ -2401,7 +2401,7 @@ static void map_linear_vram_bank(CirrusVGAState *s, unsigned bank)
 
 static void map_linear_vram(CirrusVGAState *s)
 {
-    if (!s->linear_vram) {
+    if (s->bustype == CIRRUS_BUSTYPE_PCI && !s->linear_vram) {
         s->linear_vram = true;
         memory_region_add_subregion_overlap(&s->pci_bar, 0, &s->vga.vram, 1);
     }
@@ -2411,7 +2411,7 @@ static void map_linear_vram(CirrusVGAState *s)
 
 static void unmap_linear_vram(CirrusVGAState *s)
 {
-    if (s->linear_vram) {
+    if (s->bustype == CIRRUS_BUSTYPE_PCI && s->linear_vram) {
         s->linear_vram = false;
         memory_region_del_subregion(&s->pci_bar, &s->vga.vram);
     }