1 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2 From: Gerd Hoffmann <kraxel@redhat.com>
3 Date: Mon, 30 Oct 2017 11:28:30 +0100
4 Subject: [PATCH] vga: fix region checks in wraparound case
6 Cc: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
7 Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
8 Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
9 Message-id: 20171030102830.4469-1-kraxel@redhat.com
11 hw/display/vga.c | 4 ++--
12 1 file changed, 2 insertions(+), 2 deletions(-)
14 diff --git a/hw/display/vga.c b/hw/display/vga.c
15 index 63ba404ef2..a58d8bcd67 100644
16 --- a/hw/display/vga.c
17 +++ b/hw/display/vga.c
18 @@ -1666,9 +1666,9 @@ static void vga_draw_graphic(VGACommonState *s, int full_update)
19 /* scanline wraps from end of video memory to the start */
21 update = memory_region_snapshot_get_dirty(&s->vram, snap,
23 + page0, s->vbe_size - page0);
24 update |= memory_region_snapshot_get_dirty(&s->vram, snap,
28 update = memory_region_snapshot_get_dirty(&s->vram, snap,
29 page0, page1 - page0);