aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDr. David Alan Gilbert <dgilbert@redhat.com>2015-11-05 18:10:30 +0000
committerJuan Quintela <quintela@redhat.com>2015-11-10 14:51:48 +0100
commit172dfd4faf2b64720db8a2dad7048056f2b81d75 (patch)
treebe3cf68cc735d73f37fe1cbd11747271a340afa6
parent038629a699240326928665ea97e6e11059bbc007 (diff)
downloadqemu-172dfd4faf2b64720db8a2dad7048056f2b81d75.zip
qemu-172dfd4faf2b64720db8a2dad7048056f2b81d75.tar.gz
qemu-172dfd4faf2b64720db8a2dad7048056f2b81d75.tar.bz2
Move configuration section writing
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 <dgilbert@redhat.com> Reviewed-by: Amit Shah <amit.shah@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
-rw-r--r--migration/savevm.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/migration/savevm.c b/migration/savevm.c
index e05158d..638aa1f 100644
--- a/migration/savevm.c
+++ b/migration/savevm.c
@@ -713,6 +713,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,
@@ -729,11 +735,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;