Revision 4b16eb9d hw/vga.c

b/hw/vga.c
1279 1279
    vga_draw_glyph8_func *vga_draw_glyph8;
1280 1280
    vga_draw_glyph9_func *vga_draw_glyph9;
1281 1281

  
1282
    vga_dirty_log_stop(s);
1283

  
1284 1282
    /* compute font data address (in plane 2) */
1285 1283
    v = s->sr[3];
1286 1284
    offset = (((v >> 4) & 1) | ((v << 1) & 6)) * 8192 * 4 + 2;
......
1579 1577
        cpu_physical_sync_dirty_bitmap(isa_mem_base + 0xa0000, 0xa8000);
1580 1578
        cpu_physical_sync_dirty_bitmap(isa_mem_base + 0xa8000, 0xb0000);
1581 1579
    }
1582
    vga_dirty_log_start(s);
1583 1580
}
1584 1581

  
1585 1582
/*
......
1810 1807
        return;
1811 1808
    if (s->last_scr_width <= 0 || s->last_scr_height <= 0)
1812 1809
        return;
1813
    vga_dirty_log_stop(s);
1814 1810

  
1815 1811
    s->rgb_to_pixel =
1816 1812
        rgb_to_pixel_dup_table[get_depth_index(s->ds)];
......
2238 2234
    }
2239 2235
}
2240 2236

  
2241
void vga_dirty_log_stop(VGAState *s)
2242
{
2243
    if (kvm_enabled() && s->map_addr)
2244
        kvm_log_stop(s->map_addr, s->map_end - s->map_addr);
2245

  
2246
    if (kvm_enabled() && s->lfb_vram_mapped) {
2247
        kvm_log_stop(isa_mem_base + 0xa0000, 0x8000);
2248
        kvm_log_stop(isa_mem_base + 0xa8000, 0x8000);
2249
    }
2250
}
2251

  
2252 2237
static void vga_map(PCIDevice *pci_dev, int region_num,
2253 2238
                    uint32_t addr, uint32_t size, int type)
2254 2239
{
......
2489 2474
    PCIVGAState *pvs = container_of(d, PCIVGAState, dev);
2490 2475
    VGAState *s = &pvs->vga_state;
2491 2476

  
2492
    vga_dirty_log_stop(s);
2493 2477
    pci_default_write_config(d, address, val, len);
2494 2478
    if (s->map_addr && pvs->dev.io_regions[0].addr == -1)
2495 2479
        s->map_addr = 0;
2496
    vga_dirty_log_start(s);
2497 2480
}
2498 2481

  
2499 2482
int pci_vga_init(PCIBus *bus, int vga_ram_size,

Also available in: Unified diff