diff options
author | Blue Swirl <blauwirbel@gmail.com> | 2011-10-16 16:04:59 +0000 |
---|---|---|
committer | Blue Swirl <blauwirbel@gmail.com> | 2012-01-25 18:32:47 +0000 |
commit | fd4aa979033ca604ad829cf95055d4b5c5ed1063 (patch) | |
tree | defa55c0e1815076d229f941d4fe8ddf239b799f /exec-obsolete.h | |
parent | 59abb06198ee9471e29c970f294eae80c0b39be1 (diff) |
memory: change dirty setting APIs to take a size
Instead of each target knowing or guessing the guest page size,
just pass the desired size of dirtied memory area.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'exec-obsolete.h')
-rw-r--r-- | exec-obsolete.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/exec-obsolete.h b/exec-obsolete.h index 22e0ba5cd7..03cf35ecfb 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, + ram_addr_t length, + int dirty_flags) +{ + uint8_t *p; + ram_addr_t addr, end; + + end = start + length; + p = ram_list.phys_dirty + (start >> TARGET_PAGE_BITS); + for (addr = start; addr <= end; addr += TARGET_PAGE_SIZE) { + *p++ |= dirty_flags; + } +} + static inline void cpu_physical_memory_mask_dirty_range(ram_addr_t start, ram_addr_t length, int dirty_flags) |