aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Kiszka <jan.kiszka@siemens.com>2010-01-29 15:12:48 +0100
committerAnthony Liguori <aliguori@us.ibm.com>2010-01-29 10:21:00 -0600
commit299e0bc52a5d56ff89ad8d7d09c82233cd8ccb6a (patch)
treee07f2a5d95a2fc389b82f2d0771cb64130945359
parent74f0529e246ce945d44999a1d189a2cd446d840b (diff)
cirrus: Properly re-register cirrus_linear_io_addr on vram unmap
This fixes CONFIG_FB_CIRRUS for Linux guests and probably much more: When switching away from linearly mapped vram, we also have to restore the I/O handlers for the LFB. This regression was once introduced by commit 2bec46dc97. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit 4516e45f82b7ee0cedce875477e785989a719b67)
-rw-r--r--hw/cirrus_vga.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/hw/cirrus_vga.c b/hw/cirrus_vga.c
index 6fe433db20..9f61a01d45 100644
--- a/hw/cirrus_vga.c
+++ b/hw/cirrus_vga.c
@@ -2585,9 +2585,11 @@ static void map_linear_vram(CirrusVGAState *s)
static void unmap_linear_vram(CirrusVGAState *s)
{
- if (s->vga.map_addr && s->vga.lfb_addr && s->vga.lfb_end)
+ if (s->vga.map_addr && s->vga.lfb_addr && s->vga.lfb_end) {
s->vga.map_addr = s->vga.map_end = 0;
-
+ cpu_register_physical_memory(s->vga.lfb_addr, s->vga.vram_size,
+ s->cirrus_linear_io_addr);
+ }
cpu_register_physical_memory(isa_mem_base + 0xa0000, 0x20000,
s->vga.vga_io_memory);
}