Received: from eggs.gnu.org ([2001:4830:134:3::10]:58010) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZTzOX-0007kE-1L for qemu-devel@nongnu.org; Mon, 24 Aug 2015 17:35:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZTzOT-000267-Rp for qemu-devel@nongnu.org; Mon, 24 Aug 2015 17:35:08 -0400 Received: from mx-v6.kamp.de ([2a02:248:0:51::16]:53113 helo=mx01.kamp.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZTzOT-0001zE-HN for qemu-devel@nongnu.org; Mon, 24 Aug 2015 17:35:05 -0400 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (1.0) From: Peter Lieven In-Reply-To: <55DB7CF7.3030300@suse.de> Date: Mon, 24 Aug 2015 23:35:00 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <0949893F-7548-4222-AEA1-36C73057CF0C@kamp.de> References: <1440407824-30037-1-git-send-email-pl@kamp.de> <55DB7CF7.3030300@suse.de> Subject: Re: [Qemu-devel] [PATCH] target-i386: add a list of enforceable CPU models to the help output List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?utf-8?Q?Andreas_F=C3=A4rber?= Cc: "pbonzini@redhat.com" , "qemu-devel@nongnu.org" , "ehabkost@redhat.com" , "rth@twiddle.net" > Am 24.08.2015 um 22:22 schrieb Andreas F=C3=A4rber : >=20 > Hi, >=20 >> Am 24.08.2015 um 03:17 schrieb Peter Lieven: >> this patch adds a probe that lists all enforceable and migrateable >> CPU models to the -cpu help output. The idea is to know a priory >> which CPU modules can be exposed to the user without loosing any >=20 > models >=20 >> feature flags. >>=20 >> Signed-off-by: Peter Lieven >> --- >> target-i386/cpu.c | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ >> 1 file changed, 49 insertions(+) >>=20 >> diff --git a/target-i386/cpu.c b/target-i386/cpu.c >> index cfb8aa7..3a56d3f 100644 >> --- a/target-i386/cpu.c >> +++ b/target-i386/cpu.c > [...] >> @@ -1987,6 +2026,16 @@ void x86_cpu_list(FILE *f, fprintf_function cpu_fp= rintf) >> listflags(f, cpu_fprintf, fw->feat_names); >> (*cpu_fprintf)(f, "\n"); >> } >> + >> + (*cpu_fprintf)(f, "\nEnforceable and migratable x86 CPU models in KV= M mode:\n"); >> + (*cpu_fprintf)(f, " "); >> + for (i =3D 0; i < ARRAY_SIZE(builtin_x86_defs); i++) { >> + def =3D &builtin_x86_defs[i]; >> + if (x86_cpu_enforce_and_migratable(def)) { >> + (*cpu_fprintf)(f, " %s", def->name); >> + } >> + } >> + (*cpu_fprintf)(f, "\n"); >> } >>=20 >> CpuDefinitionInfoList *arch_query_cpu_definitions(Error **errp) >=20 > I don't think adding a new section is such a good idea here, it may add > more confusion than it helps. I would rather suggest to add some > annotation to the existing list. I have also thought of this first, but found it confusing as well. But maybe= you have a good idea how to format it? I also think of Erics concern that it might be a good idea to get a json out= put of supported models somehow. Peter >=20 > Regards, > Andreas >=20 > --=20 > SUSE Linux GmbH, Maxfeldstr. 5, 90409 N=C3=BCrnberg, Germany > GF: Felix Imend=C3=B6rffer, Jane Smithard, Graham Norton; HRB 21284 (AG N=C3= =BCrnberg)