qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] cirrus: handle wraparound in cirrus_invalidate_region


From: Gerd Hoffmann
Subject: Re: [PATCH] cirrus: handle wraparound in cirrus_invalidate_region
Date: Tue, 1 Sep 2020 09:16:28 +0200

  Hi,

> +            /* wraparound */
> +            memory_region_set_dirty(&s->vga.vram, off_cur,
> s->cirrus_addr_mask - off_cur);

> So the len is 's->cirrus_addr_mask->off_cur+1'.

Correct.

> +            memory_region_set_dirty(&s->vga.vram, 0, off_cur_end);
> 
> For the 'off_cur_end' here, why we add 1 at the first?:
> 
> "off_cur_end = ((off_cur + bytesperline - 1) & s->cirrus_addr_mask) + 1;"
                                         ^^^^
> This addition '1' is what I think should be substracted in wrapped cases.

The +1 balances the -1 done before ...

take care,
  Gerd




reply via email to

[Prev in Thread] Current Thread [Next in Thread]