]> git.proxmox.com Git - mirror_qemu.git/blobdiff - exec-obsolete.h
memory: change dirty setting APIs to take a size
[mirror_qemu.git] / exec-obsolete.h
index 22e0ba5cd7c412118e153244352e3e167058c1c8..03cf35ecfb2013216c1df78d8bd32f3e6fe9f710 100644 (file)
@@ -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)