mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
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>
This commit is contained in:
parent
59abb06198
commit
fd4aa97903
12 changed files with 48 additions and 48 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue