diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2016-06-17 14:09:46 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2016-06-17 14:09:46 +0100 |
commit | 98b5b7422fe1813040b499a4be415a9f514f1c10 (patch) | |
tree | c66f57ee59521bbff2cf581bf8bb6c6c926cd5ef /migration/vmstate.c | |
parent | 4acc8fdfd315f7ee474bea28fcbcc4dca9717d13 (diff) | |
parent | 0794d8895ef8d1bd6db528e5d9ca19b86297803b (diff) | |
download | qemu-98b5b7422fe1813040b499a4be415a9f514f1c10.tar.gz |
Merge remote-tracking branch 'remotes/amit-migration/tags/migration-for-2.7-5' into staging
Migration:
- many compression/decompression fixes
- trace improvements
- static checker fix for detecting size mismatch in unused fields
- fix VM save after snapshot
# gpg: Signature made Fri 17 Jun 2016 13:59:44 BST
# gpg: using RSA key 0xEB0B4DFC657EF670
# gpg: Good signature from "Amit Shah <amit@amitshah.net>"
# gpg: aka "Amit Shah <amit@kernel.org>"
# gpg: aka "Amit Shah <amitshah@gmx.net>"
# Primary key fingerprint: 48CA 3722 5FE7 F4A8 B337 2735 1E9A 3B5F 8540 83B6
# Subkey fingerprint: CC63 D332 AB8F 4617 4529 6534 EB0B 4DFC 657E F670
* remotes/amit-migration/tags/migration-for-2.7-5:
vmstate-static-checker: fix size mismatch detection in unused fields
migration: code clean up
migration: refine the decompression code
migration: refine the compression code
migration: protect the quit flag by lock
migration: refine ram_save_compressed_page
qemu-file: Fix qemu_put_compression_data flaw
migration: remove useless code
migration: Fix a potential issue
migration: Fix multi-thread compression bug
migration: fix inability to save VM after snapshot
migration: Trace improvements
migration: Don't use *_to_cpup() and cpu_to_*w()
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'migration/vmstate.c')
-rw-r--r-- | migration/vmstate.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/migration/vmstate.c b/migration/vmstate.c index 46dc55ea40..fc29acf74d 100644 --- a/migration/vmstate.c +++ b/migration/vmstate.c @@ -32,6 +32,7 @@ static int vmstate_n_elems(void *opaque, VMStateField *field) n_elems *= field->num; } + trace_vmstate_n_elems(field->name, n_elems); return n_elems; } @@ -381,25 +382,25 @@ static int vmstate_subsection_load(QEMUFile *f, const VMStateDescription *vmsd, len = qemu_peek_byte(f, 1); if (len < strlen(vmsd->name) + 1) { /* subsection name has be be "section_name/a" */ - trace_vmstate_subsection_load_bad(vmsd->name, "(short)"); + trace_vmstate_subsection_load_bad(vmsd->name, "(short)", ""); return 0; } size = qemu_peek_buffer(f, (uint8_t **)&idstr_ret, len, 2); if (size != len) { - trace_vmstate_subsection_load_bad(vmsd->name, "(peek fail)"); + trace_vmstate_subsection_load_bad(vmsd->name, "(peek fail)", ""); return 0; } memcpy(idstr, idstr_ret, size); idstr[size] = 0; if (strncmp(vmsd->name, idstr, strlen(vmsd->name)) != 0) { - trace_vmstate_subsection_load_bad(vmsd->name, idstr); - /* it don't have a valid subsection name */ + trace_vmstate_subsection_load_bad(vmsd->name, idstr, "(prefix)"); + /* it doesn't have a valid subsection name */ return 0; } sub_vmsd = vmstate_get_subsection(vmsd->subsections, idstr); if (sub_vmsd == NULL) { - trace_vmstate_subsection_load_bad(vmsd->name, "(lookup)"); + trace_vmstate_subsection_load_bad(vmsd->name, idstr, "(lookup)"); return -ENOENT; } qemu_file_skip(f, 1); /* subsection */ @@ -409,7 +410,7 @@ static int vmstate_subsection_load(QEMUFile *f, const VMStateDescription *vmsd, ret = vmstate_load_state(f, sub_vmsd, opaque, version_id); if (ret) { - trace_vmstate_subsection_load_bad(vmsd->name, "(child)"); + trace_vmstate_subsection_load_bad(vmsd->name, idstr, "(child)"); return ret; } } |