On 6 June 2017 at 03:51, David Gibson <da...@gibson.dropbear.id.au> wrote: > From: Laurent Vivier <lviv...@redhat.com> > > We can replace the four remaining calls of register_savevm() by > calls to register_savevm_live(). So we can remove the function and > as we don't allocate anymore the ops pointer with g_new0() > we don't have to free it then. > > Signed-off-by: Laurent Vivier <lviv...@redhat.com> > Reviewed-by: Juan Quintela <quint...@redhat.com> > Signed-off-by: David Gibson <da...@gibson.dropbear.id.au> > --- > hw/net/vmxnet3.c | 8 ++++++-- > hw/s390x/s390-skeys.c | 9 +++++++-- > hw/s390x/s390-virtio-ccw.c | 8 ++++++-- > include/migration/vmstate.h | 8 -------- > migration/savevm.c | 16 ---------------- > slirp/slirp.c | 8 ++++++-- > 6 files changed, 25 insertions(+), 32 deletions(-)
Great to see register_savevm() finally disappearing. Any chance of an update to docs/migration.txt, which still mentions register_savevm(), but on the other hand doesn't say anything about register_savevm_live() and unregister_savevm(). (Doc comments in the .h file for those functions would be nice too...) Things that would be interesting to explain/document: * what is special about vmxnet3 that makes it the only pci device that needs to use this rather than having a vmstate struct? * why does s390-skeys call the register function with a NULL pointer but the unregister pointer with a device pointer? (Could we replace the uses of these which pass a dev pointer with vmstate structs and then drop the dev parameter?) thanks -- PMM