From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33664) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aG0cv-000590-FZ for qemu-devel@nongnu.org; Mon, 04 Jan 2016 03:36:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aG0cs-0000Ex-7L for qemu-devel@nongnu.org; Mon, 04 Jan 2016 03:36:29 -0500 Received: from mx2.suse.de ([195.135.220.15]:51483) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aG0cs-0000Eg-0r for qemu-devel@nongnu.org; Mon, 04 Jan 2016 03:36:26 -0500 References: <1451891897-7645-1-git-send-email-valentin.rakush@gmail.com> From: =?UTF-8?Q?Andreas_F=c3=a4rber?= Message-ID: <568A2F06.5010501@suse.de> Date: Mon, 4 Jan 2016 09:36:22 +0100 MIME-Version: 1.0 In-Reply-To: <1451891897-7645-1-git-send-email-valentin.rakush@gmail.com> Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] doc: Display i386 CPUID properties List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Valentin Rakush , qemu-devel@nongnu.org Cc: asmetanin@virtuozzo.com, den@openvz.org, Eduardo Habkost Hi, First of all this should be "target-i386:" and CC'ing Eduardo, too. Also I think you meant "X86CPU properties". This is not documentation. Am 04.01.2016 um 08:18 schrieb Valentin Rakush: > When user invokes 'qemu -cpu help' all _features_ for CPUIDs are > printed in stdout. In case of target-i386, Hyper-V CPUID _properties_ a= re > _not_ printed. This patch fixes this and displays all properties. >=20 > I think it make sense to print properties along with features, because > these properties can be used in the command line for the given CPUID. Agreed; I disagree with your approach though. You are baking into your code the wrong assumption that all properties must be static and be present in one specific generic x86 array. QOM handles all those details for you, both type inheritance and instance vs. class properties (pull upcoming). -cpu help can be extended to list some options but will never be able to list all possible options accurately, as the exact list of properties might depend on the model. Also, -cpu is a legacy option and this use case definitely does not warrant moving all that code around in the first place (you could simply go from object instance to class/properties though). Regards, Andreas >=20 > Signed-off-by: Valentin Rakush >=20 > --- > target-i386/cpu.c | 132 +++++++++++++++++++++++++++++-----------------= -------- > 1 file changed, 70 insertions(+), 62 deletions(-) --=20 SUSE Linux GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Felix Imend=F6rffer, Jane Smithard, Graham Norton; HRB 21284 (AG N=FC= rnberg)