From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932351AbbCaUWe (ORCPT ); Tue, 31 Mar 2015 16:22:34 -0400 Received: from e06smtp17.uk.ibm.com ([195.75.94.113]:58683 "EHLO e06smtp17.uk.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932331AbbCaUW3 (ORCPT ); Tue, 31 Mar 2015 16:22:29 -0400 Date: Tue, 31 Mar 2015 22:22:22 +0200 From: Michael Mueller To: Eduardo Habkost Cc: linux-s390@vger.kernel.org, kvm@vger.kernel.org, Gleb Natapov , linux-kernel@vger.kernel.org, Alexander Graf , qemu-devel@nongnu.org, Christian Borntraeger , Daniel Hansel , "Jason J. Herne" , Cornelia Huck , Paolo Bonzini , Andreas Faerber , Richard Henderson Subject: Re: [Qemu-devel] [PATCH v4 12/15] Add optional parameters to QMP command query-cpu-definitions Message-ID: <20150331222222.5c1f1780@bee> In-Reply-To: <20150331194656.GK7031@thinpad.lan.raisama.net> References: <1427725708-52100-1-git-send-email-mimu@linux.vnet.ibm.com> <1427725708-52100-13-git-send-email-mimu@linux.vnet.ibm.com> <20150331194656.GK7031@thinpad.lan.raisama.net> Organization: IBM X-Mailer: Claws Mail 3.9.3 (GTK+ 2.24.23; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15033120-0029-0000-0000-00000405365C Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 31 Mar 2015 16:46:56 -0300 Eduardo Habkost wrote: > On Mon, Mar 30, 2015 at 04:28:25PM +0200, Michael Mueller wrote: > [...] > > ## > > # @query-cpu-definitions: > > # > > # Return a list of supported virtual CPU definitions > > # > > +# @machine: #optional machine type (since 2.4) > > +# > > +# @accel: #optional accelerator id (since 2.4) > > +# > > # Returns: a list of CpuDefInfo > > # > > # Since: 1.2.0 > > ## > > -{ 'command': 'query-cpu-definitions', 'returns': ['CpuDefinitionInfo'] } > > +{ 'command': 'query-cpu-definitions', > > + 'data': { '*machine': 'str', '*accel': 'AccelId' }, > > + 'returns': ['CpuDefinitionInfo'] } > > What happens if the new parameters are provided to an old QEMU version > that doesn't accept them? It looks like we need an introspection > mechanism or a new command name. Yep, as Eric mentions: [mimu@p57lp59 (master) qemu]$ sudo virsh qemu-monitor-command zhyp027 '{ "execute": "query-cpu-definitions", "arguments": { "accel": "kvm", "machine": "s390-ccw-virtio" } }' {"id":"libvirt-13","error":{"class":"GenericError","desc":"Invalid parameter 'accel'"}} > From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47638) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yd2gE-0005bZ-BC for qemu-devel@nongnu.org; Tue, 31 Mar 2015 16:22:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yd2g9-0007nL-M4 for qemu-devel@nongnu.org; Tue, 31 Mar 2015 16:22:34 -0400 Received: from e06smtp17.uk.ibm.com ([195.75.94.113]:41765) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yd2g9-0007n5-Bz for qemu-devel@nongnu.org; Tue, 31 Mar 2015 16:22:29 -0400 Received: from /spool/local by e06smtp17.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 31 Mar 2015 21:22:26 +0100 Received: from b06cxnps3075.portsmouth.uk.ibm.com (d06relay10.portsmouth.uk.ibm.com [9.149.109.195]) by d06dlp02.portsmouth.uk.ibm.com (Postfix) with ESMTP id 80AA52190046 for ; Tue, 31 Mar 2015 21:22:12 +0100 (BST) Received: from d06av05.portsmouth.uk.ibm.com (d06av05.portsmouth.uk.ibm.com [9.149.37.229]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t2VKMOiN7078248 for ; Tue, 31 Mar 2015 20:22:24 GMT Received: from d06av05.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av05.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t2VKMOEP030376 for ; Tue, 31 Mar 2015 14:22:24 -0600 Date: Tue, 31 Mar 2015 22:22:22 +0200 From: Michael Mueller Message-ID: <20150331222222.5c1f1780@bee> In-Reply-To: <20150331194656.GK7031@thinpad.lan.raisama.net> References: <1427725708-52100-1-git-send-email-mimu@linux.vnet.ibm.com> <1427725708-52100-13-git-send-email-mimu@linux.vnet.ibm.com> <20150331194656.GK7031@thinpad.lan.raisama.net> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v4 12/15] Add optional parameters to QMP command query-cpu-definitions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eduardo Habkost Cc: linux-s390@vger.kernel.org, Cornelia Huck , kvm@vger.kernel.org, Gleb Natapov , qemu-devel@nongnu.org, linux-kernel@vger.kernel.org, Christian Borntraeger , Alexander Graf , "Jason J. Herne" , Daniel Hansel , Paolo Bonzini , Andreas Faerber , Richard Henderson On Tue, 31 Mar 2015 16:46:56 -0300 Eduardo Habkost wrote: > On Mon, Mar 30, 2015 at 04:28:25PM +0200, Michael Mueller wrote: > [...] > > ## > > # @query-cpu-definitions: > > # > > # Return a list of supported virtual CPU definitions > > # > > +# @machine: #optional machine type (since 2.4) > > +# > > +# @accel: #optional accelerator id (since 2.4) > > +# > > # Returns: a list of CpuDefInfo > > # > > # Since: 1.2.0 > > ## > > -{ 'command': 'query-cpu-definitions', 'returns': ['CpuDefinitionInfo'] } > > +{ 'command': 'query-cpu-definitions', > > + 'data': { '*machine': 'str', '*accel': 'AccelId' }, > > + 'returns': ['CpuDefinitionInfo'] } > > What happens if the new parameters are provided to an old QEMU version > that doesn't accept them? It looks like we need an introspection > mechanism or a new command name. Yep, as Eric mentions: [mimu@p57lp59 (master) qemu]$ sudo virsh qemu-monitor-command zhyp027 '{ "execute": "query-cpu-definitions", "arguments": { "accel": "kvm", "machine": "s390-ccw-virtio" } }' {"id":"libvirt-13","error":{"class":"GenericError","desc":"Invalid parameter 'accel'"}} >