From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49741) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yi4GZ-000616-S8 for qemu-devel@nongnu.org; Tue, 14 Apr 2015 13:04:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yi4GV-0002Gp-HL for qemu-devel@nongnu.org; Tue, 14 Apr 2015 13:04:51 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48445) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yi4GV-0002Ge-AL for qemu-devel@nongnu.org; Tue, 14 Apr 2015 13:04:47 -0400 From: "Dr. David Alan Gilbert (git)" Date: Tue, 14 Apr 2015 18:03:36 +0100 Message-Id: <1429031053-4454-11-git-send-email-dgilbert@redhat.com> In-Reply-To: <1429031053-4454-1-git-send-email-dgilbert@redhat.com> References: <1429031053-4454-1-git-send-email-dgilbert@redhat.com> Subject: [Qemu-devel] [PATCH v6 10/47] Rename save_live_complete to save_live_complete_precopy List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: aarcange@redhat.com, yamahata@private.email.ne.jp, quintela@redhat.com, amit.shah@redhat.com, pbonzini@redhat.com, david@gibson.dropbear.id.au, yayanghy@cn.fujitsu.com From: "Dr. David Alan Gilbert" In postcopy we're going to need to perform the complete phase for postcopiable devices at a different point, start out by renaming all of the 'complete's to make the difference obvious. Signed-off-by: Dr. David Alan Gilbert --- arch_init.c | 2 +- hw/ppc/spapr.c | 2 +- include/migration/vmstate.h | 2 +- include/sysemu/sysemu.h | 2 +- migration/block.c | 2 +- migration/migration.c | 2 +- savevm.c | 10 +++++----- trace-events | 2 +- 8 files changed, 12 insertions(+), 12 deletions(-) diff --git a/arch_init.c b/arch_init.c index 06722bb..3a21f0e 100644 --- a/arch_init.c +++ b/arch_init.c @@ -1233,7 +1233,7 @@ static int ram_load(QEMUFile *f, void *opaque, int version_id) static SaveVMHandlers savevm_ram_handlers = { .save_live_setup = ram_save_setup, .save_live_iterate = ram_save_iterate, - .save_live_complete = ram_save_complete, + .save_live_complete_precopy = ram_save_complete, .save_live_pending = ram_save_pending, .load_state = ram_load, .cancel = ram_migration_cancel, diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 61ddc79..20a1187 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -1373,7 +1373,7 @@ static int htab_load(QEMUFile *f, void *opaque, int version_id) static SaveVMHandlers savevm_htab_handlers = { .save_live_setup = htab_save_setup, .save_live_iterate = htab_save_iterate, - .save_live_complete = htab_save_complete, + .save_live_complete_precopy = htab_save_complete, .load_state = htab_load, }; diff --git a/include/migration/vmstate.h b/include/migration/vmstate.h index bc7616a..55cd174 100644 --- a/include/migration/vmstate.h +++ b/include/migration/vmstate.h @@ -40,7 +40,7 @@ typedef struct SaveVMHandlers { SaveStateHandler *save_state; void (*cancel)(void *opaque); - int (*save_live_complete)(QEMUFile *f, void *opaque); + int (*save_live_complete_precopy)(QEMUFile *f, void *opaque); /* This runs both outside and inside the iothread lock. */ bool (*is_active)(void *opaque); diff --git a/include/sysemu/sysemu.h b/include/sysemu/sysemu.h index bd67f86..8402e6e 100644 --- a/include/sysemu/sysemu.h +++ b/include/sysemu/sysemu.h @@ -87,7 +87,7 @@ void qemu_savevm_state_begin(QEMUFile *f, const MigrationParams *params); void qemu_savevm_state_header(QEMUFile *f); int qemu_savevm_state_iterate(QEMUFile *f); -void qemu_savevm_state_complete(QEMUFile *f); +void qemu_savevm_state_complete_precopy(QEMUFile *f); void qemu_savevm_state_cancel(void); uint64_t qemu_savevm_state_pending(QEMUFile *f, uint64_t max_size); int qemu_loadvm_state(QEMUFile *f); diff --git a/migration/block.c b/migration/block.c index 085c0fa..00f4998 100644 --- a/migration/block.c +++ b/migration/block.c @@ -878,7 +878,7 @@ static SaveVMHandlers savevm_block_handlers = { .set_params = block_set_params, .save_live_setup = block_save_setup, .save_live_iterate = block_save_iterate, - .save_live_complete = block_save_complete, + .save_live_complete_precopy = block_save_complete, .save_live_pending = block_save_pending, .load_state = block_load, .cancel = block_migration_cancel, diff --git a/migration/migration.c b/migration/migration.c index ce488cf..872d1e1 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -671,7 +671,7 @@ static void *migration_thread(void *opaque) ret = vm_stop_force_state(RUN_STATE_FINISH_MIGRATE); if (ret >= 0) { qemu_file_set_rate_limit(s->file, INT64_MAX); - qemu_savevm_state_complete(s->file); + qemu_savevm_state_complete_precopy(s->file); } qemu_mutex_unlock_iothread(); diff --git a/savevm.c b/savevm.c index 81f6a29..eba9174 100644 --- a/savevm.c +++ b/savevm.c @@ -720,19 +720,19 @@ static bool should_send_vmdesc(void) return !machine->suppress_vmdesc; } -void qemu_savevm_state_complete(QEMUFile *f) +void qemu_savevm_state_complete_precopy(QEMUFile *f) { QJSON *vmdesc; int vmdesc_len; SaveStateEntry *se; int ret; - trace_savevm_state_complete(); + trace_savevm_state_complete_precopy(); cpu_synchronize_all_states(); QTAILQ_FOREACH(se, &savevm_handlers, entry) { - if (!se->ops || !se->ops->save_live_complete) { + if (!se->ops || !se->ops->save_live_complete_precopy) { continue; } if (se->ops && se->ops->is_active) { @@ -745,7 +745,7 @@ void qemu_savevm_state_complete(QEMUFile *f) qemu_put_byte(f, QEMU_VM_SECTION_END); qemu_put_be32(f, se->section_id); - ret = se->ops->save_live_complete(f, se->opaque); + ret = se->ops->save_live_complete_precopy(f, se->opaque); trace_savevm_section_end(se->idstr, se->section_id, ret); if (ret < 0) { qemu_file_set_error(f, ret); @@ -858,7 +858,7 @@ static int qemu_savevm_state(QEMUFile *f, Error **errp) ret = qemu_file_get_error(f); if (ret == 0) { - qemu_savevm_state_complete(f); + qemu_savevm_state_complete_precopy(f); ret = qemu_file_get_error(f); } if (ret != 0) { diff --git a/trace-events b/trace-events index b4641b6..39957fe 100644 --- a/trace-events +++ b/trace-events @@ -1176,7 +1176,7 @@ savevm_section_end(const char *id, unsigned int section_id, int ret) "%s, sectio savevm_state_begin(void) "" savevm_state_header(void) "" savevm_state_iterate(void) "" -savevm_state_complete(void) "" +savevm_state_complete_precopy(void) "" savevm_state_cancel(void) "" vmstate_save(const char *idstr, const char *vmsd_name) "%s, %s" vmstate_load(const char *idstr, const char *vmsd_name) "%s, %s" -- 2.1.0