[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v8 04/54] Move configuration section writing
From: |
Dr. David Alan Gilbert (git) |
Subject: |
[Qemu-devel] [PATCH v8 04/54] Move configuration section writing |
Date: |
Tue, 29 Sep 2015 09:37:28 +0100 |
From: "Dr. David Alan Gilbert" <address@hidden>
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 <address@hidden>
---
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
- [Qemu-devel] [PATCH v8 00/54] Postcopy implementation, Dr. David Alan Gilbert (git), 2015/10/01
- [Qemu-devel] [PATCH v8 02/54] Provide runtime Target page information, Dr. David Alan Gilbert (git), 2015/10/01
- [Qemu-devel] [PATCH v8 01/54] Add postcopy documentation, Dr. David Alan Gilbert (git), 2015/10/01
- [Qemu-devel] [PATCH v8 04/54] Move configuration section writing,
Dr. David Alan Gilbert (git) <=
- [Qemu-devel] [PATCH v8 03/54] Init page sizes in qtest, Dr. David Alan Gilbert (git), 2015/10/01
- [Qemu-devel] [PATCH v8 06/54] Rename mis->file to from_src_file, Dr. David Alan Gilbert (git), 2015/10/01
- [Qemu-devel] [PATCH v8 05/54] qemu_ram_block_from_host, Dr. David Alan Gilbert (git), 2015/10/01
- [Qemu-devel] [PATCH v8 07/54] Add qemu_get_buffer_in_place to avoid copies some of the time, Dr. David Alan Gilbert (git), 2015/10/01
- [Qemu-devel] [PATCH v8 08/54] Add wrapper for setting blocking status on a QEMUFile, Dr. David Alan Gilbert (git), 2015/10/01
- [Qemu-devel] [PATCH v8 09/54] Add QEMU_MADV_NOHUGEPAGE, Dr. David Alan Gilbert (git), 2015/10/01