aboutsummaryrefslogtreecommitdiff
path: root/hw/vga.c
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2009-12-18 08:08:10 +1000
committerAnthony Liguori <aliguori@us.ibm.com>2009-12-18 11:26:33 -0600
commitb5cc6e32baa9d98d50debe23229b303f89fe84f1 (patch)
treeb0833ba96974237982becf03fe62370d32d95340 /hw/vga.c
parenta6109ff1b5d7184a9d490c4ff94f175940232ebd (diff)
downloadqemu-b5cc6e32baa9d98d50debe23229b303f89fe84f1.zip
qemu-b5cc6e32baa9d98d50debe23229b303f89fe84f1.tar.gz
qemu-b5cc6e32baa9d98d50debe23229b303f89fe84f1.tar.bz2
VMware VGA: Only enable dirty log tracking when fifo is disabled
This patch enables dirty log tracking whenever it's needed and disables it when it is not. We unconditionally enable dirty log tracking on reset, restart dirty log tracking when PCI IO regions are remapped, and disable/enable it based on commands from the guest. Rebased-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/vga.c')
-rw-r--r--hw/vga.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/hw/vga.c b/hw/vga.c
index 5b0c55e..d05f1f9 100644
--- a/hw/vga.c
+++ b/hw/vga.c
@@ -1606,7 +1606,29 @@ void vga_dirty_log_start(VGACommonState *s)
kvm_log_start(VBE_DISPI_LFB_PHYSICAL_ADDRESS, s->vram_size);
}
#endif
+}
+
+void vga_dirty_log_stop(VGACommonState *s)
+{
+ if (kvm_enabled() && s->map_addr)
+ kvm_log_stop(s->map_addr, s->map_end - s->map_addr);
+
+ if (kvm_enabled() && s->lfb_vram_mapped) {
+ kvm_log_stop(isa_mem_base + 0xa0000, 0x80000);
+ kvm_log_stop(isa_mem_base + 0xa8000, 0x80000);
+ }
+#ifdef CONFIG_BOCHS_VBE
+ if (kvm_enabled() && s->vbe_mapped) {
+ kvm_log_stop(VBE_DISPI_LFB_PHYSICAL_ADDRESS, s->vram_size);
+ }
+#endif
+}
+
+void vga_dirty_log_restart(VGACommonState *s)
+{
+ vga_dirty_log_stop(s);
+ vga_dirty_log_start(s);
}
/*