Received: from [140.186.70.92] (port=36467 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OSPfJ-0005Ob-HD for qemu-devel@nongnu.org; Sat, 26 Jun 2010 03:19:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OSPfI-0006ru-E0 for qemu-devel@nongnu.org; Sat, 26 Jun 2010 03:19:01 -0400 Received: from mx1.redhat.com ([209.132.183.28]:23728) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OSPfI-0006rq-5s for qemu-devel@nongnu.org; Sat, 26 Jun 2010 03:19:00 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o5Q7Ix88007770 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sat, 26 Jun 2010 03:18:59 -0400 From: Markus Armbruster Subject: Re: [Qemu-devel] [PATCH 12/19] Add a query-cputypes command to QMP References: <1275921752-29420-1-git-send-email-berrange@redhat.com> <1275921752-29420-13-git-send-email-berrange@redhat.com> Date: Sat, 26 Jun 2010 09:18:57 +0200 In-Reply-To: <1275921752-29420-13-git-send-email-berrange@redhat.com> (Daniel P. Berrange's message of "Mon, 7 Jun 2010 15:42:25 +0100") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Daniel P. Berrange" Cc: qemu-devel@nongnu.org "Daniel P. Berrange" writes: > This adds a new QMP command called 'query-cputypes' to allow > for discovery of CPU types known to the QEMU binary. This is > intended to relpace the need to parse '-cpu ?', '-cpu ?model' > and '-cpu ?dump' > > Most targets have a simple structure listing just the CPU > model names (and optionally a 'description'), with room for > future expansion of extra attributes against each model > > { > "cputypes": { > "models": [ > { > "name": "arm926" > }, > { > "name": "arm946" > }, > { > "name": "arm1026" > }, > .... > ] > } > } > > The sparc and x86 targets have extra architecture specific > metatadata. These are in keys 'x86info' and 'sparcinfo' > against each CPU model dict. These keys are repeated at the > top level to give data about all allowed feature names > > A trimmed example: > > { > "cputypes": { > "models": [ > { > "name": "n270", > "description": "Intel(R) Atom(TM) CPU N270 @ 1.60GHz", > "x86info": { > "xlevel": 2147483658, > "family": 6, > "vendor": "", > "level": 5, > "model": 28, > "stepping": 2, > "features": { > "ext_edx": [ > "lahf_lm" > ], > "edx": [ > "pbe", > "tm", > "ht", > "ss", > "sse2", > ... > ] > } > } > } > ], > "x86info": { > "features": { > "ext_edx": [ > 21, > 20, > "nodeid_msr", > "cvt16", > 17, > "fma4", > 15, > 14, > "wdt", > .... > ] > } > } > } > } > > No mapping to the legacy readline monitor is provided An alternative to arch-specific keys with equally arch-specific values would be a arch-independent key with a discriminated union value. { "cputypes": { "models": [ { "name": "n270", "description": "Intel(R) Atom(TM) CPU N270 @ 1.60GHz", "arch-info": { "arch": "x86", "xlevel": 2147483658, "family": 6, ... Dunno.