qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 18/18] tcx: convert to memory API


From: Avi Kivity
Subject: Re: [Qemu-devel] [PATCH 18/18] tcx: convert to memory API
Date: Tue, 18 Oct 2011 21:40:23 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20110930 Thunderbird/7.0.1

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.




reply via email to

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