From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:37330) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RGFWX-0007MF-FF for qemu-devel@nongnu.org; Tue, 18 Oct 2011 15:40:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RGFWV-0001tU-SL for qemu-devel@nongnu.org; Tue, 18 Oct 2011 15:40:29 -0400 Received: from mx1.redhat.com ([209.132.183.28]:3916) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RGFWV-0001tC-FP for qemu-devel@nongnu.org; Tue, 18 Oct 2011 15:40:27 -0400 Message-ID: <4E9DD627.2010701@redhat.com> Date: Tue, 18 Oct 2011 21:40:23 +0200 From: Avi Kivity MIME-Version: 1.0 References: <1318860167-14014-1-git-send-email-avi@redhat.com> <1318860167-14014-19-git-send-email-avi@redhat.com> <4E9C9488.4000908@redhat.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 18/18] tcx: convert to memory API List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: qemu-devel@nongnu.org On 10/18/2011 08:08 PM, Blue Swirl wrote: > > > What would the API look like? accept a range, return true if any of the > > pages in the range are dirty? > > That would be 1:1 conversion but maybe better approach would be to > return the first dirty address (or zero if not found), then various > bitmap speedups may be available. Ah, an iterator. Yes, it would allow switching from iteration on scan lines to iteration on actual dirty ranges. Perhaps void memory_region_for_each_dirty_range(MemoryRegion *mr, target_phys_addr_t start, uint64_t size, void (*dirty)(void *opaque, target_phys_addr_t start, uint64_t size), void *opaque); -- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.