mirror of https://gitee.com/openkylin/qemu.git
target-i386: Explicitly set vendor for each built-in cpudef
Since cpudef config is not supported anymore and all remaining sources now always set x86_def_t.vendor[123] fields, remove setting default vendor to simplify future re-factoring. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
This commit is contained in:
parent
9b15cd9e7a
commit
ebe8b9c6eb
|
@ -407,6 +407,9 @@ static x86_def_t builtin_x86_defs[] = {
|
||||||
{
|
{
|
||||||
.name = "core2duo",
|
.name = "core2duo",
|
||||||
.level = 10,
|
.level = 10,
|
||||||
|
.vendor1 = CPUID_VENDOR_INTEL_1,
|
||||||
|
.vendor2 = CPUID_VENDOR_INTEL_2,
|
||||||
|
.vendor3 = CPUID_VENDOR_INTEL_3,
|
||||||
.family = 6,
|
.family = 6,
|
||||||
.model = 15,
|
.model = 15,
|
||||||
.stepping = 11,
|
.stepping = 11,
|
||||||
|
@ -451,6 +454,9 @@ static x86_def_t builtin_x86_defs[] = {
|
||||||
{
|
{
|
||||||
.name = "qemu32",
|
.name = "qemu32",
|
||||||
.level = 4,
|
.level = 4,
|
||||||
|
.vendor1 = CPUID_VENDOR_INTEL_1,
|
||||||
|
.vendor2 = CPUID_VENDOR_INTEL_2,
|
||||||
|
.vendor3 = CPUID_VENDOR_INTEL_3,
|
||||||
.family = 6,
|
.family = 6,
|
||||||
.model = 3,
|
.model = 3,
|
||||||
.stepping = 3,
|
.stepping = 3,
|
||||||
|
@ -461,6 +467,9 @@ static x86_def_t builtin_x86_defs[] = {
|
||||||
{
|
{
|
||||||
.name = "kvm32",
|
.name = "kvm32",
|
||||||
.level = 5,
|
.level = 5,
|
||||||
|
.vendor1 = CPUID_VENDOR_INTEL_1,
|
||||||
|
.vendor2 = CPUID_VENDOR_INTEL_2,
|
||||||
|
.vendor3 = CPUID_VENDOR_INTEL_3,
|
||||||
.family = 15,
|
.family = 15,
|
||||||
.model = 6,
|
.model = 6,
|
||||||
.stepping = 1,
|
.stepping = 1,
|
||||||
|
@ -475,6 +484,9 @@ static x86_def_t builtin_x86_defs[] = {
|
||||||
{
|
{
|
||||||
.name = "coreduo",
|
.name = "coreduo",
|
||||||
.level = 10,
|
.level = 10,
|
||||||
|
.vendor1 = CPUID_VENDOR_INTEL_1,
|
||||||
|
.vendor2 = CPUID_VENDOR_INTEL_2,
|
||||||
|
.vendor3 = CPUID_VENDOR_INTEL_3,
|
||||||
.family = 6,
|
.family = 6,
|
||||||
.model = 14,
|
.model = 14,
|
||||||
.stepping = 8,
|
.stepping = 8,
|
||||||
|
@ -490,6 +502,9 @@ static x86_def_t builtin_x86_defs[] = {
|
||||||
{
|
{
|
||||||
.name = "486",
|
.name = "486",
|
||||||
.level = 1,
|
.level = 1,
|
||||||
|
.vendor1 = CPUID_VENDOR_INTEL_1,
|
||||||
|
.vendor2 = CPUID_VENDOR_INTEL_2,
|
||||||
|
.vendor3 = CPUID_VENDOR_INTEL_3,
|
||||||
.family = 4,
|
.family = 4,
|
||||||
.model = 0,
|
.model = 0,
|
||||||
.stepping = 0,
|
.stepping = 0,
|
||||||
|
@ -499,6 +514,9 @@ static x86_def_t builtin_x86_defs[] = {
|
||||||
{
|
{
|
||||||
.name = "pentium",
|
.name = "pentium",
|
||||||
.level = 1,
|
.level = 1,
|
||||||
|
.vendor1 = CPUID_VENDOR_INTEL_1,
|
||||||
|
.vendor2 = CPUID_VENDOR_INTEL_2,
|
||||||
|
.vendor3 = CPUID_VENDOR_INTEL_3,
|
||||||
.family = 5,
|
.family = 5,
|
||||||
.model = 4,
|
.model = 4,
|
||||||
.stepping = 3,
|
.stepping = 3,
|
||||||
|
@ -508,6 +526,9 @@ static x86_def_t builtin_x86_defs[] = {
|
||||||
{
|
{
|
||||||
.name = "pentium2",
|
.name = "pentium2",
|
||||||
.level = 2,
|
.level = 2,
|
||||||
|
.vendor1 = CPUID_VENDOR_INTEL_1,
|
||||||
|
.vendor2 = CPUID_VENDOR_INTEL_2,
|
||||||
|
.vendor3 = CPUID_VENDOR_INTEL_3,
|
||||||
.family = 6,
|
.family = 6,
|
||||||
.model = 5,
|
.model = 5,
|
||||||
.stepping = 2,
|
.stepping = 2,
|
||||||
|
@ -517,6 +538,9 @@ static x86_def_t builtin_x86_defs[] = {
|
||||||
{
|
{
|
||||||
.name = "pentium3",
|
.name = "pentium3",
|
||||||
.level = 2,
|
.level = 2,
|
||||||
|
.vendor1 = CPUID_VENDOR_INTEL_1,
|
||||||
|
.vendor2 = CPUID_VENDOR_INTEL_2,
|
||||||
|
.vendor3 = CPUID_VENDOR_INTEL_3,
|
||||||
.family = 6,
|
.family = 6,
|
||||||
.model = 7,
|
.model = 7,
|
||||||
.stepping = 3,
|
.stepping = 3,
|
||||||
|
@ -542,6 +566,9 @@ static x86_def_t builtin_x86_defs[] = {
|
||||||
.name = "n270",
|
.name = "n270",
|
||||||
/* original is on level 10 */
|
/* original is on level 10 */
|
||||||
.level = 5,
|
.level = 5,
|
||||||
|
.vendor1 = CPUID_VENDOR_INTEL_1,
|
||||||
|
.vendor2 = CPUID_VENDOR_INTEL_2,
|
||||||
|
.vendor3 = CPUID_VENDOR_INTEL_3,
|
||||||
.family = 6,
|
.family = 6,
|
||||||
.model = 28,
|
.model = 28,
|
||||||
.stepping = 2,
|
.stepping = 2,
|
||||||
|
@ -1534,15 +1561,10 @@ int cpu_x86_register(X86CPU *cpu, const char *cpu_model)
|
||||||
if (cpu_x86_parse_featurestr(def, features) < 0) {
|
if (cpu_x86_parse_featurestr(def, features) < 0) {
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
if (def->vendor1) {
|
assert(def->vendor1);
|
||||||
env->cpuid_vendor1 = def->vendor1;
|
env->cpuid_vendor1 = def->vendor1;
|
||||||
env->cpuid_vendor2 = def->vendor2;
|
env->cpuid_vendor2 = def->vendor2;
|
||||||
env->cpuid_vendor3 = def->vendor3;
|
env->cpuid_vendor3 = def->vendor3;
|
||||||
} else {
|
|
||||||
env->cpuid_vendor1 = CPUID_VENDOR_INTEL_1;
|
|
||||||
env->cpuid_vendor2 = CPUID_VENDOR_INTEL_2;
|
|
||||||
env->cpuid_vendor3 = CPUID_VENDOR_INTEL_3;
|
|
||||||
}
|
|
||||||
env->cpuid_vendor_override = def->vendor_override;
|
env->cpuid_vendor_override = def->vendor_override;
|
||||||
object_property_set_int(OBJECT(cpu), def->level, "level", &error);
|
object_property_set_int(OBJECT(cpu), def->level, "level", &error);
|
||||||
object_property_set_int(OBJECT(cpu), def->family, "family", &error);
|
object_property_set_int(OBJECT(cpu), def->family, "family", &error);
|
||||||
|
|
Loading…
Reference in New Issue