[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 06/10] cg3: fix up size parameter for memory_reg
From: |
Mark Cave-Ayland |
Subject: |
Re: [Qemu-devel] [PATCH 06/10] cg3: fix up size parameter for memory_region_get_dirty() |
Date: |
Tue, 4 Apr 2017 13:32:46 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.6.0 |
On 04/04/17 11:23, Gerd Hoffmann wrote:
> From: Mark Cave-Ayland <address@hidden>
>
> The code was incorrectly calculating the end address rather than the size of
> the required region.
>
> Signed-off-by: Mark Cave-Ayland <address@hidden>
> ---
> hw/display/cg3.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/display/cg3.c b/hw/display/cg3.c
> index e05ca92..6e19da0 100644
> --- a/hw/display/cg3.c
> +++ b/hw/display/cg3.c
> @@ -115,7 +115,7 @@ static void cg3_update_display(void *opaque)
> int update = s->full_update;
>
> page = y * width;
> - update |= memory_region_get_dirty(&s->vram_mem, page, page + width,
> + update |= memory_region_get_dirty(&s->vram_mem, page, width - 1,
> DIRTY_MEMORY_VGA);
> if (update) {
> if (y_start < 0) {
>
The size here should actually be "width" rather than "width - 1" here
(this patch was originally written when the assert()s for checking the
start/end of the region size were off-by-one).
ATB,
Mark.
- [Qemu-devel] [PATCH 00/10] make display updates thread safe., Gerd Hoffmann, 2017/04/04
- [Qemu-devel] [PATCH 09/10] tcx: make display updates thread safe, Gerd Hoffmann, 2017/04/04
- [Qemu-devel] [PATCH 02/10] memory: add support getting and using a dirty bitmap copy., Gerd Hoffmann, 2017/04/04
- [Qemu-devel] [PATCH 06/10] cg3: fix up size parameter for memory_region_get_dirty(), Gerd Hoffmann, 2017/04/04
- Re: [Qemu-devel] [PATCH 06/10] cg3: fix up size parameter for memory_region_get_dirty(),
Mark Cave-Ayland <=
- [Qemu-devel] [PATCH 10/10] [testing] console: remove do_safe_dpy_refresh, Gerd Hoffmann, 2017/04/04
- [Qemu-devel] [PATCH 03/10] vga: add vga_scanline_invalidated helper, Gerd Hoffmann, 2017/04/04
- [Qemu-devel] [PATCH 08/10] tcx: introduce tcx_check_dirty() function, Gerd Hoffmann, 2017/04/04
- [Qemu-devel] [PATCH 05/10] cg3: remove TARGET_PAGE_SIZE rounding on dirty page detection, Gerd Hoffmann, 2017/04/04
- [Qemu-devel] [PATCH 01/10] bitmap: add bitmap_copy_and_clear_atomic, Gerd Hoffmann, 2017/04/04
- [Qemu-devel] [PATCH 07/10] cg3: make display updates thread safe, Gerd Hoffmann, 2017/04/04
- [Qemu-devel] [PATCH 04/10] vga: make display updates thread safe., Gerd Hoffmann, 2017/04/04
- Re: [Qemu-devel] [PATCH 00/10] make display updates thread safe., Mark Cave-Ayland, 2017/04/04