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