* Juan Quintela (quint...@redhat.com) wrote: > There is no reason for having the loadvm_handlers at all. There is > only one use, and we can use the savevm handlers. > > We will remove the loadvm handlers on a following patch.
<snip> > trace_qemu_loadvm_state_section_partend(section_id); > - QLIST_FOREACH(le, &mis->loadvm_handlers, entry) { > - if (le->section_id == section_id) { > + QTAILQ_FOREACH(se, &savevm_state.handlers, entry) { > + if (se->section_id == section_id) { Isn't this the problem? What guarantees that the se->section_id is the same as the source's section_id - I don't think anything. It's just dynamically allocated in register_savevm_live so the initialisation order on source/dest could be different and you'd get different ID. You can't update se->section_id unless you guaranteed to updated all of them. Dave > break; > } > } > - if (le == NULL) { > + if (se == NULL) { > error_report("Unknown savevm section %d", section_id); > return -EINVAL; > } > > - ret = vmstate_load(f, le->se, le->version_id); > + ret = vmstate_load(f, se, se->load_version_id); > if (ret < 0) { > error_report("error while loading state section id %d(%s)", > - section_id, le->se->idstr); > + section_id, se->idstr); > return ret; > } > - if (!check_section_footer(f, le)) { > + if (!check_section_footer(f, se)) { > return -EINVAL; > } > > -- > 2.9.4 > -- Dr. David Alan Gilbert / dgilb...@redhat.com / Manchester, UK