From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:41723) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RFUvg-0004TK-R3 for qemu-devel@nongnu.org; Sun, 16 Oct 2011 13:55:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RFUvg-0007lu-0D for qemu-devel@nongnu.org; Sun, 16 Oct 2011 13:55:20 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45706) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RFUvf-0007lp-OJ for qemu-devel@nongnu.org; Sun, 16 Oct 2011 13:55:19 -0400 Message-ID: <4E9B0FE0.8090208@redhat.com> Date: Sun, 16 Oct 2011 19:09:52 +0200 From: Avi Kivity MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 4/4] vga: compile cirrus_vga in hwlib List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: qemu-devel On 10/16/2011 06:51 PM, Blue Swirl wrote: > Remove target dependencies and compile Cirrus VGA in hwlib. > > > +#define CIRRUS_PAGE_SIZE 4096 > +#define CIRRUS_PAGE_MASK (CIRRUS_PAGE_SIZE - 1) This is inverted from TARGET_PAGE_MASK. > + > #define BLTUNSAFE(s) \ > ( \ > ( /* check dst is within bounds */ \ > @@ -618,7 +621,7 @@ static void > cirrus_invalidate_region(CirrusVGAState * s, int off_begin, > for (y = 0; y < lines; y++) { > off_cur = off_begin; > off_cur_end = (off_cur + bytesperline) & s->cirrus_addr_mask; > - off_cur &= TARGET_PAGE_MASK; > + off_cur &= CIRRUS_PAGE_MASK; > memory_region_set_dirty(&s->vga.vram, off_cur, off_cur_end - off_cur); > off_begin += off_pitch; > } You can just drop this masking (and CIRRUS_PAGE_SIZE), provided that cpu_physical_memory_range_set_dirty() accepts unaligned addresses. -- error compiling committee.c: too many arguments to function