From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53927) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZgqQh-00061P-Ly for qemu-devel@nongnu.org; Tue, 29 Sep 2015 04:38:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZgqQg-0001sv-UQ for qemu-devel@nongnu.org; Tue, 29 Sep 2015 04:38:31 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57798) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZgqQg-0001sV-P9 for qemu-devel@nongnu.org; Tue, 29 Sep 2015 04:38:30 -0400 From: "Dr. David Alan Gilbert (git)" Date: Tue, 29 Sep 2015 09:37:28 +0100 Message-Id: <1443515898-3594-5-git-send-email-dgilbert@redhat.com> In-Reply-To: <1443515898-3594-1-git-send-email-dgilbert@redhat.com> References: <1443515898-3594-1-git-send-email-dgilbert@redhat.com> Subject: [Qemu-devel] [PATCH v8 04/54] Move configuration section writing List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, quintela@redhat.com, amit.shah@redhat.com Cc: aarcange@redhat.com, pbonzini@redhat.com, liang.z.li@intel.com, luis@cs.umu.se, bharata@linux.vnet.ibm.com From: "Dr. David Alan Gilbert" The vmstate_configuration is currently written in 'qemu_savevm_state_begin', move it to 'qemu_savevm_state_header' since it's got a hard requirement that it must be the 1st thing after the header. (In postcopy some 'command' sections get sent early before the saving of the main sections and hence before qemu_savevm_state_begin). Signed-off-by: Dr. David Alan Gilbert --- migration/savevm.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/migration/savevm.c b/migration/savevm.c index 33e55fe..d8847c4 100644 --- a/migration/savevm.c +++ b/migration/savevm.c @@ -712,6 +712,12 @@ void qemu_savevm_state_header(QEMUFile *f) trace_savevm_state_header(); qemu_put_be32(f, QEMU_VM_FILE_MAGIC); qemu_put_be32(f, QEMU_VM_FILE_VERSION); + + if (!savevm_state.skip_configuration) { + qemu_put_byte(f, QEMU_VM_CONFIGURATION); + vmstate_save_state(f, &vmstate_configuration, &savevm_state, 0); + } + } void qemu_savevm_state_begin(QEMUFile *f, @@ -728,11 +734,6 @@ void qemu_savevm_state_begin(QEMUFile *f, se->ops->set_params(params, se->opaque); } - if (!savevm_state.skip_configuration) { - qemu_put_byte(f, QEMU_VM_CONFIGURATION); - vmstate_save_state(f, &vmstate_configuration, &savevm_state, 0); - } - QTAILQ_FOREACH(se, &savevm_state.handlers, entry) { if (!se->ops || !se->ops->save_live_setup) { continue; -- 2.5.0