qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 06/17] target-i386: remove vendor_override field


From: Eduardo Habkost
Subject: Re: [Qemu-devel] [PATCH 06/17] target-i386: remove vendor_override field from CPUX86State
Date: Fri, 11 Jan 2013 10:06:35 -0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Fri, Jan 11, 2013 at 03:10:20AM +0100, Igor Mammedov wrote:
> commit 8935499831312 makes cpuid return to guest host's vendor value
> instead of built-in one by default if kvm_enabled() == true and allows
> to override this behavior if 'vendor' is specified on -cpu command line.
> 
> But every time guest calls cpuid to get 'vendor' value, host's value is
> read again and again in default case.
> 
> It complicates semantic of vendor property and makes it harder to use.
> 
> Instead of reading 'vendor' value from host every time cpuid[vendor] is
> called, override 'vendor' value only once in cpu_x86_find_by_name(), when
> built-in CPU model is found and if(kvm_enabled() == true).
> 
> It provides the same default semantic
>  if (kvm_enabled() == true)  vendor = host's vendor
>  else vendor = built-in vendor
> 
> and then later:
>  if (custom vendor) vendor = custom vendor
> 
> 'vendor' value is overridden when user provides it on -cpu command line,
> and there isn't need in vendor_override field anymore, remove it.
> 
> Signed-off-by: Igor Mammedov <address@hidden>

In case my previous reviewed-by line (buried in the discussion about
property defaults) was missed:

Reviewed-by: Eduardo Habkost <address@hidden>

> ---
>  v4:
>    - rebased with "target-i386: move out CPU features initialization
>      in separate func" dropped. So remove vendor_override in
>      cpu_x86_register() instead.
>    - replace x86cpu_vendor_words2str() with x86_cpu_vendor_words2str()
>      due to renaming of the last in previous patch
> ---
>  target-i386/cpu.c |   27 ++++++++++++---------------
>  target-i386/cpu.h |    1 -
>  2 files changed, 12 insertions(+), 16 deletions(-)
> 
[...]

-- 
Eduardo



reply via email to

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