target-i386: Remove vendor_override field from CPUX86State
commit11acfdd5a1647895ff9094e7f93f3317224eb4d8
authorIgor Mammedov <imammedo@redhat.com>
Mon, 21 Jan 2013 14:06:37 +0000 (21 15:06 +0100)
committerAndreas Färber <afaerber@suse.de>
Sun, 27 Jan 2013 13:34:27 +0000 (27 14:34 +0100)
treeccd07d19e0e364e5fa5a14c28f3372c939a82d18
parent99b88a1708919934f4092f7b6dcc2cca9d4072e9
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>
target-i386/cpu.c
target-i386/cpu.h