On 19/05/2017 09:33, David Gibson wrote: > On Fri, May 19, 2017 at 11:10:36AM +0530, Bharata B Rao wrote: >> Introduce a new function unregister_savevm_live() to unregister the vmstate >> handlers registered via register_savevm_live(). >> >> register_savevm() allocates SaveVMHandlers while register_savevm_live() >> gets passed with SaveVMHandlers. During unregistration, we want to >> free SaveVMHandlers in the former case but not free in the latter case. >> Hence this new API is needed to differentiate this. >> >> This new API will be needed by PowerPC to unregister the HTAB savevm >> handlers. >> >> Signed-off-by: Bharata B Rao <bhar...@linux.vnet.ibm.com> > > Reviewed-by: David Gibson <da...@gibson.dropbear.id.au> > > I could take this through my tree, but it would need an ACK from Dave > Gilbert or Juan Quintela.
I cc: them for that. Just a comment on the patch. Instead of introducing a new function, perhaps we can homogenize the use of register_savevm() by always providing a SaveVMHandlers pointer and never a couple of (SaveStateHandler, LoadStateHandler) so the unregister_save() has never to free se->ops? Laurent