From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753865AbbCaTvO (ORCPT ); Tue, 31 Mar 2015 15:51:14 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46272 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750903AbbCaTvL (ORCPT ); Tue, 31 Mar 2015 15:51:11 -0400 Message-ID: <551AFAA1.8080003@redhat.com> Date: Tue, 31 Mar 2015 13:50:57 -0600 From: Eric Blake Organization: Red Hat, Inc. User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Eduardo Habkost , Michael Mueller CC: qemu-devel@nongnu.org, kvm@vger.kernel.org, linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org, Gleb Natapov , Alexander Graf , Christian Borntraeger , "Jason J. Herne" , Cornelia Huck , Paolo Bonzini , Andreas Faerber , Richard Henderson , Daniel Hansel Subject: Re: [PATCH v4 12/15] Add optional parameters to QMP command query-cpu-definitions 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> In-Reply-To: <20150331194656.GK7031@thinpad.lan.raisama.net> OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="qFwk5fAc5JfI59jT5aRMvLASBjGkUA52S" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --qFwk5fAc5JfI59jT5aRMvLASBjGkUA52S Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 03/31/2015 01:46 PM, 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'] } >=20 > 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. Providing an optional parameter that a new qemu understands to an older qemu gracefully errors out about an unknown parameter. But it's annoying to have to probe for whether the parameter is understood by exploiting that particular error message from older qemu. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --qFwk5fAc5JfI59jT5aRMvLASBjGkUA52S Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJVGvqhAAoJEKeha0olJ0NqNbwH/0AUZOtT/RYcOocmgeEYvjoO WsgkTB1Pl//qYgXhnHPX/I1ysSMpW6kkjiGZPbm5hqgt1dgSDb0VtCdczSOaMIlL WW5CkfjsUW08MD10hBq8QZ141pMoMTqanMJhcOmnxm2kmxm7e9f2W6PdFB6lfalD GJIyZLJDTfiqxODeILLs+PSYQLK98ly7i/+dyM9NOrjLAw9et38Cc0qYwFsZ7xEf YD317TCf+aYP6isc+Ikf4qBizHlaIzJfWLl/z1RZtOgu1YVAr1q2jnHRFSaqqtxJ SoThkTT9VLXoqNon4piW6UsK4Eb9sVi3ex9A72tsq4e1qQVeEhp/AM3dHzG+uB8= =a7bt -----END PGP SIGNATURE----- --qFwk5fAc5JfI59jT5aRMvLASBjGkUA52S-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Blake Subject: Re: [PATCH v4 12/15] Add optional parameters to QMP command query-cpu-definitions Date: Tue, 31 Mar 2015 13:50:57 -0600 Message-ID: <551AFAA1.8080003@redhat.com> 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: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="qFwk5fAc5JfI59jT5aRMvLASBjGkUA52S" Return-path: In-Reply-To: <20150331194656.GK7031@thinpad.lan.raisama.net> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org Sender: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org List-Archive: List-Post: To: Eduardo Habkost , Michael Mueller 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 List-ID: This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --qFwk5fAc5JfI59jT5aRMvLASBjGkUA52S Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 03/31/2015 01:46 PM, 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'] } >=20 > 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. Providing an optional parameter that a new qemu understands to an older qemu gracefully errors out about an unknown parameter. But it's annoying to have to probe for whether the parameter is understood by exploiting that particular error message from older qemu. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --qFwk5fAc5JfI59jT5aRMvLASBjGkUA52S Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJVGvqhAAoJEKeha0olJ0NqNbwH/0AUZOtT/RYcOocmgeEYvjoO WsgkTB1Pl//qYgXhnHPX/I1ysSMpW6kkjiGZPbm5hqgt1dgSDb0VtCdczSOaMIlL WW5CkfjsUW08MD10hBq8QZ141pMoMTqanMJhcOmnxm2kmxm7e9f2W6PdFB6lfalD GJIyZLJDTfiqxODeILLs+PSYQLK98ly7i/+dyM9NOrjLAw9et38Cc0qYwFsZ7xEf YD317TCf+aYP6isc+Ikf4qBizHlaIzJfWLl/z1RZtOgu1YVAr1q2jnHRFSaqqtxJ SoThkTT9VLXoqNon4piW6UsK4Eb9sVi3ex9A72tsq4e1qQVeEhp/AM3dHzG+uB8= =a7bt -----END PGP SIGNATURE----- --qFwk5fAc5JfI59jT5aRMvLASBjGkUA52S-- From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42150) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yd2Br-0006hf-0b for qemu-devel@nongnu.org; Tue, 31 Mar 2015 15:51:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yd2Bn-0006ls-PN for qemu-devel@nongnu.org; Tue, 31 Mar 2015 15:51:10 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41170) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yd2Bn-0006lo-HX for qemu-devel@nongnu.org; Tue, 31 Mar 2015 15:51:07 -0400 Message-ID: <551AFAA1.8080003@redhat.com> Date: Tue, 31 Mar 2015 13:50:57 -0600 From: Eric Blake MIME-Version: 1.0 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> In-Reply-To: <20150331194656.GK7031@thinpad.lan.raisama.net> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="qFwk5fAc5JfI59jT5aRMvLASBjGkUA52S" 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 , Michael Mueller 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 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --qFwk5fAc5JfI59jT5aRMvLASBjGkUA52S Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 03/31/2015 01:46 PM, 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'] } >=20 > 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. Providing an optional parameter that a new qemu understands to an older qemu gracefully errors out about an unknown parameter. But it's annoying to have to probe for whether the parameter is understood by exploiting that particular error message from older qemu. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --qFwk5fAc5JfI59jT5aRMvLASBjGkUA52S Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJVGvqhAAoJEKeha0olJ0NqNbwH/0AUZOtT/RYcOocmgeEYvjoO WsgkTB1Pl//qYgXhnHPX/I1ysSMpW6kkjiGZPbm5hqgt1dgSDb0VtCdczSOaMIlL WW5CkfjsUW08MD10hBq8QZ141pMoMTqanMJhcOmnxm2kmxm7e9f2W6PdFB6lfalD GJIyZLJDTfiqxODeILLs+PSYQLK98ly7i/+dyM9NOrjLAw9et38Cc0qYwFsZ7xEf YD317TCf+aYP6isc+Ikf4qBizHlaIzJfWLl/z1RZtOgu1YVAr1q2jnHRFSaqqtxJ SoThkTT9VLXoqNon4piW6UsK4Eb9sVi3ex9A72tsq4e1qQVeEhp/AM3dHzG+uB8= =a7bt -----END PGP SIGNATURE----- --qFwk5fAc5JfI59jT5aRMvLASBjGkUA52S--