[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v3 31/35] arch_init: export ram_save_iterate()
From: |
Isaku Yamahata |
Subject: |
[Qemu-devel] [PATCH v3 31/35] arch_init: export ram_save_iterate() |
Date: |
Tue, 30 Oct 2012 17:33:07 +0900 |
Signed-off-by: Isaku Yamahata <address@hidden>
---
arch_init.c | 11 ++++++++---
arch_init.h | 1 +
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/arch_init.c b/arch_init.c
index f86a0b4..48f45cd 100644
--- a/arch_init.c
+++ b/arch_init.c
@@ -633,7 +633,7 @@ static int ram_save_setup(QEMUFile *f, void *opaque)
return 0;
}
-static int ram_save_iterate(QEMUFile *f, void *opaque)
+int ram_save_iterate(QEMUFile *f)
{
uint64_t bytes_transferred_last;
double bwidth = 0;
@@ -705,6 +705,11 @@ static int ram_save_iterate(QEMUFile *f, void *opaque)
return 0;
}
+static int ram_save_iterate_bwidth(QEMUFile *f, void *opaque)
+{
+ return ram_save_iterate(f);
+}
+
static int ram_save_complete(QEMUFile *f, void *opaque)
{
migration_bitmap_sync();
@@ -937,7 +942,7 @@ static void ram_save_set_params(const MigrationParams
*params, void *opaque)
savevm_ram_handlers.save_live_complete =
postcopy_outgoing_ram_save_complete;
} else {
- savevm_ram_handlers.save_live_iterate = ram_save_iterate;
+ savevm_ram_handlers.save_live_iterate = ram_save_iterate_bwidth;
savevm_ram_handlers.save_live_complete = ram_save_complete;
}
}
@@ -945,7 +950,7 @@ static void ram_save_set_params(const MigrationParams
*params, void *opaque)
SaveVMHandlers savevm_ram_handlers = {
.set_params = ram_save_set_params,
.save_live_setup = ram_save_setup,
- .save_live_iterate = ram_save_iterate,
+ .save_live_iterate = ram_save_iterate_bwidth,
.save_live_complete = ram_save_complete,
.load_state = ram_load_precopy,
.cancel = ram_migration_cancel,
diff --git a/arch_init.h b/arch_init.h
index 3977ca7..966b25a 100644
--- a/arch_init.h
+++ b/arch_init.h
@@ -47,6 +47,7 @@ CpuDefinitionInfoList GCC_WEAK_DECL
*arch_query_cpu_definitions(Error **errp);
#define RAM_SAVE_VERSION_ID 4 /* currently version 4 */
int ram_load_page(QEMUFile *f, void *host, int flags);
+int ram_save_iterate(QEMUFile *f);
#if defined(NEED_CPU_H) && !defined(CONFIG_USER_ONLY)
void ram_save_set_last_block(RAMBlock *block, ram_addr_t offset);
--
1.7.10.4
- [Qemu-devel] [PATCH v3 20/35] osdep: add QEMU_MADV_REMOVE and tirivial fix, (continued)
- [Qemu-devel] [PATCH v3 20/35] osdep: add QEMU_MADV_REMOVE and tirivial fix, Isaku Yamahata, 2012/10/30
- [Qemu-devel] [PATCH v3 01/35] migration.c: remove redundant line in migrate_init(), Isaku Yamahata, 2012/10/30
- [Qemu-devel] [PATCH v3 14/35] arch_init: refactor ram_save_block() and export ram_save_block(), Isaku Yamahata, 2012/10/30
- [Qemu-devel] [PATCH v3 11/35] savevm, buffered_file: introduce method to drain buffer of buffered file, Isaku Yamahata, 2012/10/30
- [Qemu-devel] [PATCH v3 33/35] arch_init: export migration_bitmap_sync and helper method to get bitmap, Isaku Yamahata, 2012/10/30
- [Qemu-devel] [PATCH v3 29/35] postcopy/outgoing: add movebg mode(-m) to migration command, Isaku Yamahata, 2012/10/30
- [Qemu-devel] [PATCH v3 24/35] postcopy outgoing: add -p option to migrate command, Isaku Yamahata, 2012/10/30
- [Qemu-devel] [PATCH v3 07/35] savevm: export qemu_peek_buffer, qemu_peek_byte, qemu_file_skip, qemu_fflush, Isaku Yamahata, 2012/10/30
- [Qemu-devel] [PATCH v3 15/35] arch_init/ram_save_setup: factor out bitmap alloc/free, Isaku Yamahata, 2012/10/30
- [Qemu-devel] [PATCH v3 19/35] uvmem.h: import Linux uvmem.h and teach update-linux-headers.sh, Isaku Yamahata, 2012/10/30
- [Qemu-devel] [PATCH v3 31/35] arch_init: export ram_save_iterate(),
Isaku Yamahata <=
- [Qemu-devel] [PATCH v3 28/35] arch_init: factor out setting last_block, last_offset, Isaku Yamahata, 2012/10/30
- [Qemu-devel] [PATCH v3 17/35] arch_init: factor out logic to find ram block with id string, Isaku Yamahata, 2012/10/30
- [Qemu-devel] [PATCH v3 18/35] migration: export migrate_fd_completed() and migrate_fd_cleanup(), Isaku Yamahata, 2012/10/30
- [Qemu-devel] [PATCH v3 34/35] postcopy/outgoing: introduce precopy_count parameter, Isaku Yamahata, 2012/10/30
- [Qemu-devel] [PATCH v3 16/35] arch_init/ram_load: refactor ram_load, Isaku Yamahata, 2012/10/30
- [Qemu-devel] [PATCH v3 13/35] arch_init/ram_save: introduce constant for ram save version = 4, Isaku Yamahata, 2012/10/30
- [Qemu-devel] [PATCH v3 30/35] arch_init: factor out ram_load, Isaku Yamahata, 2012/10/30
- [Qemu-devel] [PATCH v3 22/35] savevm: add new section that is used by postcopy, Isaku Yamahata, 2012/10/30
- [Qemu-devel] [PATCH v3 32/35] postcopy: pre+post optimization incoming side, Isaku Yamahata, 2012/10/30
- [Qemu-devel] [PATCH v3 21/35] postcopy: introduce helper functions for postcopy, Isaku Yamahata, 2012/10/30