diff options
author | Igor Mammedov <imammedo@redhat.com> | 2013-01-21 15:06:37 +0100 |
---|---|---|
committer | Andreas Färber <afaerber@suse.de> | 2013-01-27 14:34:27 +0100 |
commit | 11acfdd5a1647895ff9094e7f93f3317224eb4d8 (patch) | |
tree | ccd07d19e0e364e5fa5a14c28f3372c939a82d18 /target-i386/cpu.h | |
parent | 99b88a1708919934f4092f7b6dcc2cca9d4072e9 (diff) |
target-i386: Remove vendor_override field from CPUX86State
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 semantics 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 semantics
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 is no need for vendor_override field anymore, remove it.
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'target-i386/cpu.h')
-rw-r--r-- | target-i386/cpu.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/target-i386/cpu.h b/target-i386/cpu.h index 3833e6f019..62508dc688 100644 --- a/target-i386/cpu.h +++ b/target-i386/cpu.h @@ -835,7 +835,6 @@ typedef struct CPUX86State { uint32_t cpuid_ext2_features; uint32_t cpuid_ext3_features; uint32_t cpuid_apic_id; - int cpuid_vendor_override; /* Store the results of Centaur's CPUID instructions */ uint32_t cpuid_xlevel2; uint32_t cpuid_ext4_features; |