[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
- Re: [Qemu-devel] [PATCH 04/17] target-i386: add x86_cpu_vendor_words2str(), (continued)
[Qemu-devel] [PATCH 04/17 v2] target-i386: add x86_cpu_vendor_words2str(), Igor Mammedov, 2013/01/10
[Qemu-devel] [PATCH 06/17] target-i386: remove vendor_override field from CPUX86State, Igor Mammedov, 2013/01/10
Re: [Qemu-devel] [PATCH 06/17] target-i386: remove vendor_override field from CPUX86State,
Eduardo Habkost <=
[Qemu-devel] [PATCH 05/17] target-i386: replace uint32_t vendor fields by vendor string in x86_def_t, Igor Mammedov, 2013/01/10
- Re: [Qemu-devel] [PATCH 05/17] target-i386: replace uint32_t vendor fields by vendor string in x86_def_t, Eduardo Habkost, 2013/01/10
- Re: [Qemu-devel] [PATCH 05/17] target-i386: replace uint32_t vendor fields by vendor string in x86_def_t, Andreas Färber, 2013/01/14
- Re: [Qemu-devel] [PATCH 05/17] target-i386: replace uint32_t vendor fields by vendor string in x86_def_t, Eduardo Habkost, 2013/01/14
- [Qemu-devel] [PATCH] target-i386: make x86_def_t.vendor[1, 2, 3] a string and use cpuid_vendor union in CPUX86State, Igor Mammedov, 2013/01/15
- Re: [Qemu-devel] [PATCH] target-i386: make x86_def_t.vendor[1, 2, 3] a string and use cpuid_vendor union in CPUX86State, Eduardo Habkost, 2013/01/15
- Re: [Qemu-devel] [PATCH] target-i386: make x86_def_t.vendor[1, 2, 3] a string and use cpuid_vendor union in CPUX86State, Igor Mammedov, 2013/01/15
- Re: [Qemu-devel] [PATCH] target-i386: make x86_def_t.vendor[1, 2, 3] a string and use cpuid_vendor union in CPUX86State, li guang, 2013/01/16
- Re: [Qemu-devel] [PATCH] target-i386: make x86_def_t.vendor[1, 2, 3] a string and use cpuid_vendor union in CPUX86State, Igor Mammedov, 2013/01/16
Re: [Qemu-devel] [PATCH 05/17] target-i386: replace uint32_t vendor fields by vendor string in x86_def_t, Igor Mammedov, 2013/01/14