From patchwork Tue Feb 18 05:53:20 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: mrhines@linux.vnet.ibm.com X-Patchwork-Id: 321281 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 172B42C00D2 for ; Tue, 18 Feb 2014 16:54:56 +1100 (EST) Received: from localhost ([::1]:46427 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WFddu-0007s1-0y for incoming@patchwork.ozlabs.org; Tue, 18 Feb 2014 00:54:54 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45187) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WFdcr-0006sX-SO for qemu-devel@nongnu.org; Tue, 18 Feb 2014 00:53:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WFdcg-0000Aw-0o for qemu-devel@nongnu.org; Tue, 18 Feb 2014 00:53:49 -0500 Received: from e35.co.us.ibm.com ([32.97.110.153]:50692) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WFdcf-0000AW-QV for qemu-devel@nongnu.org; Tue, 18 Feb 2014 00:53:37 -0500 Received: from /spool/local by e35.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 17 Feb 2014 22:53:37 -0700 Received: from d03dlp03.boulder.ibm.com (9.17.202.179) by e35.co.us.ibm.com (192.168.1.135) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 17 Feb 2014 22:53:35 -0700 Received: from b03cxnp08026.gho.boulder.ibm.com (b03cxnp08026.gho.boulder.ibm.com [9.17.130.18]) by d03dlp03.boulder.ibm.com (Postfix) with ESMTP id A113819D8036 for ; Mon, 17 Feb 2014 22:53:33 -0700 (MST) Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by b03cxnp08026.gho.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id s1I5rBEa9503224 for ; Tue, 18 Feb 2014 06:53:11 +0100 Received: from d03av02.boulder.ibm.com (localhost [127.0.0.1]) by d03av02.boulder.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s1I5rYeH020594 for ; Mon, 17 Feb 2014 22:53:34 -0700 Received: from mrhinesdev.crl.ibm.com ([9.186.105.50]) by d03av02.boulder.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id s1I5rUiK020466; Mon, 17 Feb 2014 22:53:32 -0700 From: mrhines@linux.vnet.ibm.com To: qemu-devel@nongnu.org Date: Tue, 18 Feb 2014 13:53:20 +0800 Message-Id: <1392702802-11592-2-git-send-email-mrhines@linux.vnet.ibm.com> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1392702802-11592-1-git-send-email-mrhines@linux.vnet.ibm.com> References: <1392702802-11592-1-git-send-email-mrhines@linux.vnet.ibm.com> X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 14021805-6688-0000-0000-000006B1808C X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 32.97.110.153 Cc: hinesmr@cn.ibm.com, "Michael R. Hines" , quintela@redhat.com Subject: [Qemu-devel] [RFC PATCH v1 1/3] provenance: QMP command to store MigrationInfo from JSON X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: "Michael R. Hines" This is the QMP documentation and schema for a command that allows the migration protocol on the destination side to 'install' a whole MigrationInfo json structure as received in-tact from the source into the MigrationState struct so that query-migrate can print the information as-is without having to install the values one-by-one. Signed-off-by: Michael R. Hines --- qapi-schema.json | 14 ++++++++++++++ qmp-commands.hx | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) diff --git a/qapi-schema.json b/qapi-schema.json index 7cfb5e5..c84ca0f 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -717,6 +717,20 @@ 'data': { 'capabilities': ['MigrationCapabilityStatus'] } } ## +# @migrate-set-last-info +# +# Store migration info/statistics. Currently only used by the migration +# protocol itself to tell the destination about the results before +# the source QEMU is destroyed. +# +# @info: json array of MigrationInfo statistics from a previous migration. +# +# Since: 2.0 +## +{ 'command': 'migrate-set-last-info', + 'data': { 'info': 'MigrationInfo' } } + +## # @query-migrate-capabilities # # Returns information about the current migration capabilities status diff --git a/qmp-commands.hx b/qmp-commands.hx index cce6b81..1108940 100644 --- a/qmp-commands.hx +++ b/qmp-commands.hx @@ -3015,6 +3015,39 @@ EQMP .params = "capability:s,state:b", .mhandler.cmd_new = qmp_marshal_input_migrate_set_capabilities, }, + +SQMP +migrate-set-last-info +------------------------ + +Store migration info/statistics. Currently only used by the migration +protocol itself to tell the destination about the results before +the source QEMU is destroyed. + +NOTE: There is no need to execute this command explicitly except for +testing, as this information is already transmitted as part of the +migration protocol. Thus, there is no HMP command made available for +this option - only QMP. + +The example below is simple, but the migration protocol will actually +transfer the entire JSON string that originated from the source, no +matter what is inside of it, which should survive future version of +QEMU when new statistics are added to the protocol. + +Arguments: +- info: MigrationInfo statistics dictionary (json-object) + +Example: + +-> { "execute": "migrate-set-last-info" , "arguments": + { "info": { "downtime": 1234, "ram" : { "transferred" : 5678 } } } } +EQMP + { + .name = "migrate-set-last-info", + .args_type = "info:O", + .mhandler.cmd_new = qmp_marshal_input_migrate_set_last_info, + }, + SQMP query-migrate-capabilities --------------------------