Patchwork [v2,01/41] arch_init: export sort_ram_list() and ram_save_block()

login
register
mail settings
Submitter Isaku Yamahata
Date June 4, 2012, 9:57 a.m.
Message ID <00bc188e328b7368bc0b8f5d69fd899b068899f2.1338802192.git.yamahata@valinux.co.jp>
Download mbox | patch
Permalink /patch/162765/
State New
Headers show

Comments

Isaku Yamahata - June 4, 2012, 9:57 a.m.
This will be used by postcopy.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
---
 arch_init.c |    4 ++--
 migration.h |    2 ++
 2 files changed, 4 insertions(+), 2 deletions(-)

Patch

diff --git a/arch_init.c b/arch_init.c
index a9e8b74..38e0173 100644
--- a/arch_init.c
+++ b/arch_init.c
@@ -164,7 +164,7 @@  static int is_dup_page(uint8_t *page)
 static RAMBlock *last_block;
 static ram_addr_t last_offset;
 
-static int ram_save_block(QEMUFile *f)
+int ram_save_block(QEMUFile *f)
 {
     RAMBlock *block = last_block;
     ram_addr_t offset = last_offset;
@@ -273,7 +273,7 @@  static int block_compar(const void *a, const void *b)
     return strcmp((*ablock)->idstr, (*bblock)->idstr);
 }
 
-static void sort_ram_list(void)
+void sort_ram_list(void)
 {
     RAMBlock *block, *nblock, **blocks;
     int n;
diff --git a/migration.h b/migration.h
index 2e9ca2e..8b9509c 100644
--- a/migration.h
+++ b/migration.h
@@ -76,6 +76,8 @@  uint64_t ram_bytes_remaining(void);
 uint64_t ram_bytes_transferred(void);
 uint64_t ram_bytes_total(void);
 
+void sort_ram_list(void);
+int ram_save_block(QEMUFile *f);
 int ram_save_live(QEMUFile *f, int stage, void *opaque);
 int ram_load(QEMUFile *f, void *opaque, int version_id);