From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36177) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dIx2N-00058M-A4 for qemu-devel@nongnu.org; Thu, 08 Jun 2017 08:59:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dIx2M-0003q3-JQ for qemu-devel@nongnu.org; Thu, 08 Jun 2017 08:59:43 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47610) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dIx2M-0003o0-Cs for qemu-devel@nongnu.org; Thu, 08 Jun 2017 08:59:42 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DDD66C04B332 for ; Thu, 8 Jun 2017 12:59:40 +0000 (UTC) Date: Thu, 8 Jun 2017 14:59:37 +0200 From: Kevin Wolf Message-ID: <20170608125937.GC4427@noname.redhat.com> References: <20170601221552.30628-1-quintela@redhat.com> <20170601221552.30628-4-quintela@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170601221552.30628-4-quintela@redhat.com> Subject: Re: [Qemu-devel] [PATCH 3/5] migration: Create load_setup()/cleanup() methods List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Juan Quintela Cc: qemu-devel@nongnu.org, lvivier@redhat.com, dgilbert@redhat.com, peterx@redhat.com Am 02.06.2017 um 00:15 hat Juan Quintela geschrieben: > We need to do things at load time. > > Signed-off-by: Juan Quintela > --- > include/migration/register.h | 2 ++ > migration/savevm.c | 31 +++++++++++++++++++++++++++++++ > 2 files changed, 33 insertions(+) > > diff --git a/include/migration/register.h b/include/migration/register.h > index 8e37185..0862bb8 100644 > --- a/include/migration/register.h > +++ b/include/migration/register.h > @@ -42,6 +42,8 @@ typedef struct SaveVMHandlers { > uint64_t *non_postcopiable_pending, > uint64_t *postcopiable_pending); > LoadStateHandler *load_state; > + int (*load_setup)(QEMUFile *f, void *opaque); > + int (*load_cleanup)(void *opaque); > } SaveVMHandlers; I see that you add code to call load_setup(), but don't you want to call load_cleanup() somewhere, too? Kevin