qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] doc: Display i386 CPUID properties


From: Andreas Färber
Subject: Re: [Qemu-devel] [PATCH] doc: Display i386 CPUID properties
Date: Mon, 4 Jan 2016 09:36:22 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0

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_ are
> _not_ printed. This patch fixes this and displays all properties.
> 
> 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

> 
> Signed-off-by: Valentin Rakush <address@hidden>
> 
> ---
>  target-i386/cpu.c | 132 
> +++++++++++++++++++++++++++++-------------------------
>  1 file changed, 70 insertions(+), 62 deletions(-)

-- 
SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer, Jane Smithard, Graham Norton; HRB 21284 (AG Nürnberg)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]