diff options
author | Avi Kivity <avi@redhat.com> | 2009-12-20 16:43:53 +0200 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2009-12-20 16:43:53 +0200 |
commit | 2cdbc2e634a25c32b351501fcbdf816bd51cd164 (patch) | |
tree | 987bfe5ca2a4cf687968d241252b94ea365422bd /hw | |
parent | Merge branch 'stable-0.12-merge' into stable-0.12 (diff) | |
download | qemu-kvm-2cdbc2e634a25c32b351501fcbdf816bd51cd164.tar.gz qemu-kvm-2cdbc2e634a25c32b351501fcbdf816bd51cd164.tar.bz2 qemu-kvm-2cdbc2e634a25c32b351501fcbdf816bd51cd164.zip |
Adjust vga dirty logging for upstream changes
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/vga.c | 15 |
1 files changed, 10 insertions, 5 deletions
@@ -1594,7 +1594,7 @@ static void vga_sync_dirty_bitmap(VGACommonState *s) vga_dirty_log_start(s); } -static int s1, s2; +static int s1, s2, s3; static void mark_dirty(target_phys_addr_t start, target_phys_addr_t len) { @@ -1625,26 +1625,31 @@ void vga_dirty_log_start(VGACommonState *s) #ifdef CONFIG_BOCHS_VBE if (kvm_enabled() && s->vbe_mapped) { - kvm_log_start(VBE_DISPI_LFB_PHYSICAL_ADDRESS, s->vram_size); + if (!s3) { + kvm_log_start(VBE_DISPI_LFB_PHYSICAL_ADDRESS, s->vram_size); + } + s3 = 1; } #endif } void vga_dirty_log_stop(VGACommonState *s) { - if (kvm_enabled() && s->map_addr) + if (kvm_enabled() && s->map_addr && s1) kvm_log_stop(s->map_addr, s->map_end - s->map_addr); - if (kvm_enabled() && s->lfb_vram_mapped) { + if (kvm_enabled() && s->lfb_vram_mapped && s2) { 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) { + if (kvm_enabled() && s->vbe_mapped && s3) { kvm_log_stop(VBE_DISPI_LFB_PHYSICAL_ADDRESS, s->vram_size); } #endif + + s1 = s2 = s3 = 0; } void vga_dirty_log_restart(VGACommonState *s) |