From: Avi Kivity <[EMAIL PROTECTED]>

the attached patch fixes the screen corruption issues which were
reported by others, see:

http://article.gmane.org/gmane.comp.emulators.kvm.devel/13543
http://article.gmane.org/gmane.comp.emulators.kvm.devel/13409

The bug is kvm specific and can only be observed in graphics mode using
relatively high resolutions (when one line uses more than one page of
memory). As far as I've seen this bug is around since commit
dd9591e0fea25a1414f4a6b2faa61ed733e0acc6 (5 nov 2006).

Signed-off-by: Avi Kivity <[EMAIL PROTECTED]>

diff --git a/qemu/hw/vga.c b/qemu/hw/vga.c
index 222a39c..040d500 100644
--- a/qemu/hw/vga.c
+++ b/qemu/hw/vga.c
@@ -1568,7 +1568,7 @@ static void vga_draw_graphic(VGAState *s, int full_update)
             update |= cpu_physical_memory_get_dirty(page0 + TARGET_PAGE_SIZE,
                                                     VGA_DIRTY_FLAG);
            if (kvm_enabled())
-               update |= bitmap_get_dirty(bitmap, (page0 - s->vram_offset) >> 
TARGET_PAGE_BITS);
+               update |= bitmap_get_dirty(bitmap, (page0 + TARGET_PAGE_SIZE - 
s->vram_offset) >> TARGET_PAGE_BITS);
         }
         /* explicit invalidation for the hardware cursor */
         update |= (s->invalidated_y_table[y >> 5] >> (y & 0x1f)) & 1;

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
kvm-commits mailing list
kvm-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-commits

Reply via email to