diff mbox

[v3,33/35] arch_init: export migration_bitmap_sync and helper method to get bitmap

Message ID 64f87d0df0445764707fb109c59346e6b30b0f40.1351582535.git.yamahata@valinux.co.jp
State New
Headers show

Commit Message

Isaku Yamahata Oct. 30, 2012, 8:33 a.m. UTC
Those migration bitmap operation will be used by postcopy.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
---
 arch_init.c |    7 ++++++-
 migration.h |    2 ++
 2 files changed, 8 insertions(+), 1 deletion(-)
diff mbox

Patch

diff --git a/arch_init.c b/arch_init.c
index 48f45cd..49fbaff 100644
--- a/arch_init.c
+++ b/arch_init.c
@@ -345,6 +345,11 @@  void migration_bitmap_free(void)
     migration_bitmap = NULL;
 }
 
+const unsigned long *migration_bitmap_get(void)
+{
+    return migration_bitmap;
+}
+
 static inline bool migration_bitmap_test_and_reset_dirty(MemoryRegion *mr,
                                                          ram_addr_t offset)
 {
@@ -373,7 +378,7 @@  static inline bool migration_bitmap_set_dirty(MemoryRegion *mr,
     return ret;
 }
 
-static void migration_bitmap_sync(void)
+void migration_bitmap_sync(void)
 {
     RAMBlock *block;
     ram_addr_t addr;
diff --git a/migration.h b/migration.h
index 6cc3682..2801e7e 100644
--- a/migration.h
+++ b/migration.h
@@ -111,6 +111,8 @@  uint64_t ram_bytes_transferred(void);
 uint64_t ram_bytes_total(void);
 void migration_bitmap_init(void);
 void migration_bitmap_free(void);
+const unsigned long *migration_bitmap_get(void);
+void migration_bitmap_sync(void);
 
 extern SaveVMHandlers savevm_ram_handlers;