Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752111AbbBRIkY (ORCPT ); Wed, 18 Feb 2015 03:40:24 -0500 Received: from e06smtp15.uk.ibm.com ([195.75.94.111]:42012 "EHLO e06smtp15.uk.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751945AbbBRIkT (ORCPT ); Wed, 18 Feb 2015 03:40:19 -0500 Date: Wed, 18 Feb 2015 09:39:59 +0100 From: Michael Mueller To: Eric Blake 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 Subject: Re: [Qemu-devel] [RFC PATCH v2 11/15] cpu-model/s390: Add QMP command query-cpu-model Message-ID: <20150218093959.31982d1c@bee> In-Reply-To: <54E3825F.7080701@redhat.com> References: <1424183053-4310-1-git-send-email-mimu@linux.vnet.ibm.com> <1424183053-4310-12-git-send-email-mimu@linux.vnet.ibm.com> <54E3825F.7080701@redhat.com> 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 X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15021808-0021-0000-0000-000002EF1E8F Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by nfs id t1I8eW3S022108 Content-Length: 3046 Lines: 95 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tue, 17 Feb 2015 11:03:11 -0700 Eric Blake wrote: > On 02/17/2015 07:24 AM, Michael Mueller wrote: > > This patch implements a new QMP request named 'query-cpu-model'. > > It returns the cpu model of cpu 0 and its backing accelerator. > > > > request: > > {"execute" : "query-cpu-model" } > > > > answer: > > {"return" : {"name": "2827-ga2", "accelerator": "kvm" }} > > > > Alias names are resolved to their respective machine type and GA names > > already during cpu instantiation. Thus, also a cpu model like 'host' > > which is implemented as alias will return its normalized cpu model name. > > > > Furthermore the patch implements the following functions: > > > > - s390_cpu_typename(), returns the currently selected cpu type name or NULL > > - s390_cpu_models_used(), returns true if S390 cpu models are in use > > > > Signed-off-by: Michael Mueller > > --- > > > > +## > > +# @CpuModelInfo: > > +# > > +# Virtual CPU model definition. > > +# > > +# @name: the name of the CPU model definition > > +# > > +# Since: 2.3.0 > > +## > > +{ 'type': 'CpuModelInfo', > > + 'data': { 'name': 'str', '*accelerator': 'AccelId' } } > > You didn't document '*accelerator', including mention that it is > optional (why would it not be output always?). Right, as it is a new command and all cpus once implementing it have an associated accelerator there is no point in making it optional. Will add a comment as well. > > > + > > +## > > +# @query-cpu-model: > > +# > > +# Return to current virtual CPU model > > s/to/the/ yep > > > +# > > +# Returns: CpuModelInfo > > +# > > +# Since: 2.3.0 > > We aren't very consistent on '2.3' vs. '2.3.0', so I won't complain > about that. But you seem to prefer major and minor only, so I will skip the trailing 0. > > > +## > > +{ 'command': 'query-cpu-model', 'returns': 'CpuModelInfo' } > > Seems reasonable from the interface point of view; I have not closely > reviewed the implementation. > Thanks Michael -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJU5E/fAAoJELPcPLQSJsKQYksP/inWhcSnQF6WgNTaF2qsEqyG 6kRyAwfVID9k0Rh1Eh3fDKbDDrtXe1pB3dbHlX6JWWrDCQCzfFxbRDElK3lX4k1g ryAi9ZRPZ7TB88eGIS66vQ4J/O9WWe/I7tzoX2yeFcMRNa9+8dpyluPHWNYbeN6f KkzQy15PabCiggwQuDfm+X4jiV7HtIdxRVNuOJV4j2U8p6Wp5YaZMEp8MJQ2tDMe Uion91VZ2izLQ/rn+QIb1F28om03LWfh47sKzam9l9oomFglGhmHXkEktL+KCQTK MSUQOiIK3rSzZiFq5dsjIAOo1bkrjYpPxUfxq0xDjreJoGkd1sbtQ663QHG0RUTT 1G0BNKHxNggkxoxyChaEYWopNyZ2wMEn3XBaVHvnfDqDyymsWo3nAQVWIMwFpHth vSfBLY3CJnAW4HnDiaV3+sNDlFZlttzPE5jVXibR98sCdQORNEpCt9frdu1AToGB MCiAwJMc1qescJMghsogCUzG9ElA7wbvGIv+e/uEGj7LB/1H0ZMIpN/QU9NDd3Fi XpldGvPLIWRJq7/l8c6/KNg8SbTn1prtGZ1pKNOlkmn+BeEQjcihEmGOStoWny48 1hT08enhBJ9skXvWlGTvYBlohQ6vERwZ5B9E4tmSeLRQG+4YkE3JTyb0FJJScBoV l1X+PmwiT2AfeXLlDHlm =6Qmi -----END PGP SIGNATURE----- ????{.n?+???????+%?????ݶ??w??{.n?+????{??G?????{ay?ʇڙ?,j??f???h?????????z_??(?階?ݢj"???m??????G????????????&???~???iO???z??v?^?m???? ????????I?