On 13.01.23 16:27, Peter Xu wrote:
On Fri, Jan 13, 2023 at 10:20:31AM -0500, Peter Xu wrote:
On Fri, Jan 13, 2023 at 02:47:24PM +0100, David Hildenbrand wrote:
I'd prefer to not go down that path for now. QEMU_VM_SECTION_START without
QEMU_VM_SECTION_PART and QEMU_VM_SECTION_END feels pretty incomplete and
wrong to me.
That's fine.
If we want to do that in the future, we should conditionally send
QEMU_VM_SECTION_START only if we have se->ops I assume?
Yes. START/FULL frames are mostly replaceable afaiu in the stream ABI, so
we always have space to change no matter what. Let's leave that as-is.
If so, please consider adding one more paragraph describing the difference
in vmsd early_setup comments (on using FULL for early vmsd and START for
save_setup), hopefully it'll make things clearer.
What about the following:
diff --git a/include/migration/vmstate.h b/include/migration/vmstate.h
index 7bc0cd9de9..cc910cab0f 100644
--- a/include/migration/vmstate.h
+++ b/include/migration/vmstate.h
@@ -188,6 +188,11 @@ struct VMStateDescription {
* One SaveStateEntry should either have the save_setup() specified or
* the vmsd with early_setup set to true. It should never have both
* things set.
+ *
+ * Note that for now, a SaveStateEntry cannot have a VMSD and
+ * operations (e.g., save_setup()) set at the same time. For this reason,
+ * also early_setup VMSDs are migrated in a QEMU_VM_SECTION_FULL section,
+ * while save_setup() data is migrated in a QEMU_VM_SECTION_START section.
*/
bool early_setup;
int version_id;
Thanks!
--
Thanks,
David / dhildenb