I looked closely at the vga code in kvm-userspace a while ago and merged every fix I could understand into upstream QEMU. This particular change makes no sense to me. I could not figure out from revision history what it actually fixed. I'm fairly certain it's not useful today. Signed-off-by: Anthony Liguori <aliguori@xxxxxxxxxx> --- hw/vga.c | 27 ++++----------------------- 1 files changed, 4 insertions(+), 23 deletions(-) diff --git a/hw/vga.c b/hw/vga.c index d96f1be..385184a 100644 --- a/hw/vga.c +++ b/hw/vga.c @@ -2227,33 +2227,14 @@ typedef struct PCIVGAState { VGAState vga_state; } PCIVGAState; -static int s1, s2; - -static void mark_dirty(target_phys_addr_t start, target_phys_addr_t len) -{ - target_phys_addr_t end = start + len; - - while (start < end) { - cpu_physical_memory_set_dirty(cpu_get_physical_page_desc(start)); - start += TARGET_PAGE_SIZE; - } -} - void vga_dirty_log_start(VGAState *s) { if (kvm_enabled() && s->map_addr) - if (!s1) { - kvm_log_start(s->map_addr, s->map_end - s->map_addr); - mark_dirty(s->map_addr, s->map_end - s->map_addr); - s1 = 1; - } + kvm_log_start(s->map_addr, s->map_end - s->map_addr); + if (kvm_enabled() && s->lfb_vram_mapped) { - if (!s2) { - kvm_log_start(isa_mem_base + 0xa0000, 0x8000); - kvm_log_start(isa_mem_base + 0xa8000, 0x8000); - mark_dirty(isa_mem_base + 0xa0000, 0x10000); - } - s2 = 1; + kvm_log_start(isa_mem_base + 0xa0000, 0x8000); + kvm_log_start(isa_mem_base + 0xa8000, 0x8000); } } -- 1.6.0.6 -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html