From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35651) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V6BOH-0000gj-NV for qemu-devel@nongnu.org; Sun, 04 Aug 2013 23:23:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V6BO8-0007t8-N4 for qemu-devel@nongnu.org; Sun, 04 Aug 2013 23:23:25 -0400 Received: from e28smtp01.in.ibm.com ([122.248.162.1]:60485) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V6BO8-0007sm-35 for qemu-devel@nongnu.org; Sun, 04 Aug 2013 23:23:16 -0400 Received: from /spool/local by e28smtp01.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 5 Aug 2013 08:44:48 +0530 Received: from d28relay03.in.ibm.com (d28relay03.in.ibm.com [9.184.220.60]) by d28dlp01.in.ibm.com (Postfix) with ESMTP id 016A6E004F for ; Mon, 5 Aug 2013 08:53:18 +0530 (IST) Received: from d28av01.in.ibm.com (d28av01.in.ibm.com [9.184.220.63]) by d28relay03.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r753OCss43581656 for ; Mon, 5 Aug 2013 08:54:12 +0530 Received: from d28av01.in.ibm.com (loopback [127.0.0.1]) by d28av01.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id r753N3xP002619 for ; Mon, 5 Aug 2013 03:23:03 GMT Message-ID: <51FF1A67.8010900@linux.vnet.ibm.com> Date: Mon, 05 Aug 2013 11:22:15 +0800 From: Lei Li MIME-Version: 1.0 References: <1374783499-2550-1-git-send-email-lilei@linux.vnet.ibm.com> <1374783499-2550-13-git-send-email-lilei@linux.vnet.ibm.com> <51FC0CD0.2030007@linux.vnet.ibm.com> In-Reply-To: <51FC0CD0.2030007@linux.vnet.ibm.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 12/12] hmp: add hmp_localhost_migration interface List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael R. Hines" Cc: aarcange@redhat.com, aliguori@us.ibm.com, quintela@redhat.com, qemu-devel@nongnu.org, lagarcia@br.ibm.com, pbonzini@redhat.com, rcj@linux.vnet.ibm.com On 08/03/2013 03:47 AM, Michael R. Hines wrote: > On 07/25/2013 04:18 PM, Lei Li wrote: >> Signed-off-by: Lei Li >> --- >> hmp-commands.hx | 17 +++++++++++++++++ >> hmp.c | 13 +++++++++++++ >> hmp.h | 1 + >> 3 files changed, 31 insertions(+), 0 deletions(-) >> >> diff --git a/hmp-commands.hx b/hmp-commands.hx >> index 915b0d1..ed21970 100644 >> --- a/hmp-commands.hx >> +++ b/hmp-commands.hx >> @@ -989,6 +989,23 @@ STEXI >> Set the spice/vnc connection info for the migration target. The >> spice/vnc >> server will ask the spice/vnc client to automatically reconnect >> using the >> new parameters (if specified) once the vm migration finished >> successfully. >> + >> +ETEXI >> + >> + { >> + .name = "localhost_migrate", >> + .args_type = "uri:s", >> + .params = "uri", >> + .help = "migrate to domain socket URI on localhost", >> + .mhandler.cmd = hmp_localhost_migrate, >> + }, >> + >> + >> +STEXI >> +@item localhost_migrate @var{uri} >> +@findex localhost_migrate >> +Migrate to @var{uri}. >> + >> ETEXI >> >> { >> diff --git a/hmp.c b/hmp.c >> index 494a9aa..a7e779f 100644 >> --- a/hmp.c >> +++ b/hmp.c >> @@ -1191,6 +1191,19 @@ void hmp_migrate(Monitor *mon, const QDict >> *qdict) >> } >> } >> >> +void hmp_localhost_migrate(Monitor *mon, const QDict *qdict) >> +{ >> + const char *uri = qdict_get_str(qdict, "uri"); >> + Error *errp = NULL; >> + >> + qmp_localhost_migrate(uri, &errp); >> + if (errp) { >> + monitor_printf(mon, "local_migrate: %s\n", >> error_get_pretty(errp)); >> + error_free(errp); >> + return; >> + } >> +} >> + >> void hmp_device_del(Monitor *mon, const QDict *qdict) >> { >> const char *id = qdict_get_str(qdict, "id"); >> diff --git a/hmp.h b/hmp.h >> index 56d2e92..9124c0e 100644 >> --- a/hmp.h >> +++ b/hmp.h >> @@ -60,6 +60,7 @@ void hmp_migrate_set_downtime(Monitor *mon, const >> QDict *qdict); >> void hmp_migrate_set_speed(Monitor *mon, const QDict *qdict); >> void hmp_migrate_set_capability(Monitor *mon, const QDict *qdict); >> void hmp_migrate_set_cache_size(Monitor *mon, const QDict *qdict); >> +void hmp_localhost_migrate(Monitor *mon, const QDict *qdict); >> void hmp_set_password(Monitor *mon, const QDict *qdict); >> void hmp_expire_password(Monitor *mon, const QDict *qdict); >> void hmp_eject(Monitor *mon, const QDict *qdict); > > This could go away if you just create a new URI prefix instead of a > new command-line switch. Yes, you are right. I think a new URI prefix is a good idea. > > - Michael -- Lei