diff mbox

[1/5] cpu: add cpu_physical_memory_clear_dirty_range_nocode

Message ID 1416254843-16859-2-git-send-email-mst@redhat.com
State New
Headers show

Commit Message

Michael S. Tsirkin Nov. 17, 2014, 8:08 p.m. UTC
simple wrapper so callers don't need to know about
dirty bitmap clients.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
 include/exec/ram_addr.h | 8 ++++++++
 1 file changed, 8 insertions(+)

Comments

Juan Quintela Nov. 19, 2014, 9:10 a.m. UTC | #1
"Michael S. Tsirkin" <mst@redhat.com> wrote:
> simple wrapper so callers don't need to know about
> dirty bitmap clients.
>
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

Reviewed-by: Juan Quintela <quintela@redhat.com>
diff mbox

Patch

diff --git a/include/exec/ram_addr.h b/include/exec/ram_addr.h
index cf1d4c7..d7e5238 100644
--- a/include/exec/ram_addr.h
+++ b/include/exec/ram_addr.h
@@ -159,6 +159,14 @@  static inline void cpu_physical_memory_clear_dirty_range(ram_addr_t start,
     bitmap_clear(ram_list.dirty_memory[client], page, end - page);
 }
 
+static inline void cpu_physical_memory_clear_dirty_range_nocode(ram_addr_t start,
+                                                                ram_addr_t length)
+{
+    cpu_physical_memory_clear_dirty_range(start, length, DIRTY_MEMORY_MIGRATION);
+    cpu_physical_memory_clear_dirty_range(start, length, DIRTY_MEMORY_VGA);
+}
+
+
 void cpu_physical_memory_reset_dirty(ram_addr_t start, ram_addr_t length,
                                      unsigned client);