Received: from eggs.gnu.org ([208.118.235.92]:49829) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SlHGl-0007HM-2z for qemu-devel@nongnu.org; Sun, 01 Jul 2012 06:20:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SlHGi-0007dL-SI for qemu-devel@nongnu.org; Sun, 01 Jul 2012 06:20:42 -0400 Received: from mx1.redhat.com ([209.132.183.28]:23637) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SlHGi-0007dG-KX for qemu-devel@nongnu.org; Sun, 01 Jul 2012 06:20:40 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q61AKeQ7012407 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sun, 1 Jul 2012 06:20:40 -0400 From: Juan Quintela In-Reply-To: <4FF00826.3080006@redhat.com> (Orit Wasserman's message of "Sun, 01 Jul 2012 11:19:50 +0300") References: <620debbcb9bc99dc6db54d87a8683efbc00c2b66.1340910651.git.quintela@redhat.com> <4FF00826.3080006@redhat.com> Date: Sun, 01 Jul 2012 12:20:17 +0200 Message-ID: <87obnzu6ji.fsf@elfo.mitica> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH 02/12] savevm: Live migration handlers register the struct directly Reply-To: quintela@redhat.com List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Orit Wasserman Cc: qemu-devel@nongnu.org Orit Wasserman wrote: > On 06/28/2012 10:22 PM, Juan Quintela wrote: >> Notice that the live migration users never unregister, so no problem >> about freeing the ops structure. >> void unregister_savevm(DeviceState *dev, const char *idstr, void *opaque) >> diff --git a/vl.c b/vl.c >> index 1329c30..b1f31e8 100644 >> --- a/vl.c >> +++ b/vl.c >> @@ -3438,8 +3438,7 @@ int main(int argc, char **argv, char **envp) >> default_drive(default_sdcard, snapshot, machine->use_scsi, >> IF_SD, 0, SD_OPTS); >> >> - register_savevm_live(NULL, "ram", 0, 4, NULL, ram_save_live, NULL, >> - ram_load, NULL); >> + register_savevm_live(NULL, "ram", 0, 4, &savevm_ram_handlers, NULL); >> > > Juan, > Can't we move it migration.c (migrate_init and qemu_start_incoming migration)? > this will remove to use an extern for savevm_ram_handlers. savevm_ram_handlers are exported from arch_init.c, what do we win if we move it? Furthermore, I add more functions to this extructure later in the series, so not exporting the structure and having to export more functions what bring to us? Thanks, Juan.