From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:55011) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RkE4W-0007i5-1J for qemu-devel@nongnu.org; Mon, 09 Jan 2012 07:11:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RkE4Q-0005mM-1d for qemu-devel@nongnu.org; Mon, 09 Jan 2012 07:11:28 -0500 Received: from mx1.redhat.com ([209.132.183.28]:36987) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RkE4P-0005mI-OE for qemu-devel@nongnu.org; Mon, 09 Jan 2012 07:11:21 -0500 Message-ID: <4F0AD965.3040305@redhat.com> Date: Mon, 09 Jan 2012 14:11:17 +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 2/4] memory: change dirty setting APIs to take a size List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: qemu-devel On 01/08/2012 11:10 PM, Blue Swirl wrote: > Instead of each target knowing or guessing the guest page size, > just pass the desired size of dirtied memory area. This should also > improve performance due to memset() optimizations. > > diff --git a/exec-obsolete.h b/exec-obsolete.h > index f8af27e..019c09a 100644 > --- a/exec-obsolete.h > +++ b/exec-obsolete.h > @@ -76,6 +76,20 @@ static inline int > cpu_physical_memory_set_dirty_flags(ram_addr_t addr, > return ram_list.phys_dirty[addr >> TARGET_PAGE_BITS] |= dirty_flags; > } > > +static inline void cpu_physical_memory_set_dirty_range(ram_addr_t start, > + int length, > + int dirty_flags) > +{ > + int i, len; > + uint8_t *p; > + > + len = length >> TARGET_PAGE_BITS; > + p = ram_list.phys_dirty + (start >> TARGET_PAGE_BITS); > + for (i = 0; i < len; i++) { > + p[i] |= dirty_flags; > + } > +} > + Breaks for start = 0xfff, length = 2. -- error compiling committee.c: too many arguments to function