Received: from eggs.gnu.org ([2001:4830:134:3::10]:35603) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bcfD5-00017j-Ka for qemu-devel@nongnu.org; Wed, 24 Aug 2016 16:55:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bcfD1-00076q-Cx for qemu-devel@nongnu.org; Wed, 24 Aug 2016 16:55:42 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:50556) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bcfD1-00076h-4E for qemu-devel@nongnu.org; Wed, 24 Aug 2016 16:55:39 -0400 Received: from pps.filterd (m0098404.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.11/8.16.0.11) with SMTP id u7OKs7eL106897 for ; Wed, 24 Aug 2016 16:55:36 -0400 Received: from e06smtp05.uk.ibm.com (e06smtp05.uk.ibm.com [195.75.94.101]) by mx0a-001b2d01.pphosted.com with ESMTP id 250qp54mc0-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Wed, 24 Aug 2016 16:55:36 -0400 Received: from localhost by e06smtp05.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 24 Aug 2016 21:55:34 +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 DFF462190023 for ; Wed, 24 Aug 2016 21:54:55 +0100 (BST) Received: from d06av04.portsmouth.uk.ibm.com (d06av04.portsmouth.uk.ibm.com [9.149.37.216]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id u7OKtWCY32833616 for ; Wed, 24 Aug 2016 20:55:32 GMT Received: from d06av04.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av04.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id u7OKtVLf032298 for ; Wed, 24 Aug 2016 14:55:32 -0600 Date: Wed, 24 Aug 2016 22:55:26 +0200 From: David Hildenbrand In-Reply-To: <57BE0844.3030907@redhat.com> References: <1472062266-53206-1-git-send-email-dahi@linux.vnet.ibm.com> <1472062266-53206-2-git-send-email-dahi@linux.vnet.ibm.com> <57BE0844.3030907@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-Id: <20160824225526.0364ece1@thinkpad-w530> Subject: Re: [Qemu-devel] [Patch v3 01/30] qmp: details about CPU definitions in query-cpu-definitions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: qemu-devel@nongnu.org, ehabkost@redhat.com, borntraeger@de.ibm.com, fiuczy@linux.vnet.ibm.com, cornelia.huck@de.ibm.com, imammedo@redhat.com, jdenemar@redhat.com, mimu@linux.vnet.ibm.com > On 08/24/2016 01:10 PM, David Hildenbrand wrote: > > It might be of interest for tooling whether a CPU definition can be safely > > used when migrating, or if e.g. CPU features might get lost during > > migration when migrationg from/to a different QEMU version or host, even if > > the same compatibility machine is used. > > > > Also, we want to know if a CPU definition is static and will never change. > > Beause these definitions can then be used independantly of a compatibility > > machine and will always have the same feature set, they can e.g. be used > > to indicate the "host" model in libvirt later on. > > > > Let's add two return values to query-cpu-definitions, stating for each > > returned CPU definition, if it is migration-safe and if it is static. > > > > While "migration-safe" is optional, "static" will be set to "false" > > automatically by all implementing architectures. If a model really was > > static all the time and will be in the future, this can simply be changed > > later. > > > > Signed-off-by: David Hildenbrand > > --- > > qapi-schema.json | 14 +++++++++++++- > > 1 file changed, 13 insertions(+), 1 deletion(-) > > > > diff --git a/qapi-schema.json b/qapi-schema.json > > index 5658723..0d9ae50 100644 > > --- a/qapi-schema.json > > +++ b/qapi-schema.json > > @@ -3038,10 +3038,22 @@ > > # > > # @name: the name of the CPU definition > > # > > +# @migration-safe: #optional whether a CPU definition can be safely used for > > +# migration in combination with a QEMU compatibility machine > > +# when migrating between different QMU versions and between > > +# hosts with different sets of (hardware or software) > > Why two spaces after 'hosts'? > > > +# capabilities. If not provided, information is not available > > +# and callers should not assume the CPU definition to be > > +# migration-safe. > > Missing a '(since 2.8)' designation (at least, I'm assuming this is 2.8 > material). > > > +# > > +# @static: whether a CPU definition is static and will not change depending on > > +# QEMU version, machine type, machine options and accelerator options. > > +# A static model is always migration-safe. > > Likewise missing a since tag. > > > +# > > # Since: 1.2.0 > > ## > > { 'struct': 'CpuDefinitionInfo', > > - 'data': { 'name': 'str' } } > > + 'data': { 'name': 'str', '*migration-safe' : 'bool', 'static' : 'bool' } } > > We aren't consistent on whether to use space before ':' or to put it > flush against the key, but it's at least nice to be consistent within a > single line. > All valid and fixed! Thanks for having a look! David