aboutsummaryrefslogtreecommitdiff
path: root/target/i386/cpu.c
diff options
context:
space:
mode:
Diffstat (limited to 'target/i386/cpu.c')
-rw-r--r--target/i386/cpu.c57
1 files changed, 27 insertions, 30 deletions
diff --git a/target/i386/cpu.c b/target/i386/cpu.c
index c69d057df3..dd83cb7f72 100644
--- a/target/i386/cpu.c
+++ b/target/i386/cpu.c
@@ -4260,12 +4260,12 @@ static void max_x86_cpu_initfn(Object *obj)
host_vendor_fms(vendor, &family, &model, &stepping);
cpu_x86_fill_model_id(model_id);
- object_property_set_str(OBJECT(cpu), vendor, "vendor", &error_abort);
- object_property_set_int(OBJECT(cpu), family, "family", &error_abort);
- object_property_set_int(OBJECT(cpu), model, "model", &error_abort);
- object_property_set_int(OBJECT(cpu), stepping, "stepping",
+ object_property_set_str(OBJECT(cpu), "vendor", vendor, &error_abort);
+ object_property_set_int(OBJECT(cpu), "family", family, &error_abort);
+ object_property_set_int(OBJECT(cpu), "model", model, &error_abort);
+ object_property_set_int(OBJECT(cpu), "stepping", stepping,
&error_abort);
- object_property_set_str(OBJECT(cpu), model_id, "model-id",
+ object_property_set_str(OBJECT(cpu), "model-id", model_id,
&error_abort);
if (kvm_enabled()) {
@@ -4285,20 +4285,20 @@ static void max_x86_cpu_initfn(Object *obj)
}
if (lmce_supported()) {
- object_property_set_bool(OBJECT(cpu), true, "lmce", &error_abort);
+ object_property_set_bool(OBJECT(cpu), "lmce", true, &error_abort);
}
} else {
- object_property_set_str(OBJECT(cpu), CPUID_VENDOR_AMD,
- "vendor", &error_abort);
- object_property_set_int(OBJECT(cpu), 6, "family", &error_abort);
- object_property_set_int(OBJECT(cpu), 6, "model", &error_abort);
- object_property_set_int(OBJECT(cpu), 3, "stepping", &error_abort);
- object_property_set_str(OBJECT(cpu),
+ object_property_set_str(OBJECT(cpu), "vendor", CPUID_VENDOR_AMD,
+ &error_abort);
+ object_property_set_int(OBJECT(cpu), "family", 6, &error_abort);
+ object_property_set_int(OBJECT(cpu), "model", 6, &error_abort);
+ object_property_set_int(OBJECT(cpu), "stepping", 3, &error_abort);
+ object_property_set_str(OBJECT(cpu), "model-id",
"QEMU TCG CPU version " QEMU_HW_VERSION,
- "model-id", &error_abort);
+ &error_abort);
}
- object_property_set_bool(OBJECT(cpu), true, "pmu", &error_abort);
+ object_property_set_bool(OBJECT(cpu), "pmu", true, &error_abort);
}
static const TypeInfo max_x86_cpu_type_info = {
@@ -5067,7 +5067,7 @@ static void x86_cpu_apply_props(X86CPU *cpu, PropValue *props)
if (!pv->value) {
continue;
}
- object_property_parse(OBJECT(cpu), pv->value, pv->prop,
+ object_property_parse(OBJECT(cpu), pv->prop, pv->value,
&error_abort);
}
}
@@ -5086,7 +5086,7 @@ static void x86_cpu_apply_version_props(X86CPU *cpu, X86CPUModel *model)
PropValue *p;
for (p = vdef->props; p && p->prop; p++) {
- object_property_parse(OBJECT(cpu), p->value, p->prop,
+ object_property_parse(OBJECT(cpu), p->prop, p->value,
&error_abort);
}
@@ -5117,18 +5117,16 @@ static void x86_cpu_load_model(X86CPU *cpu, X86CPUModel *model)
*/
/* CPU models only set _minimum_ values for level/xlevel: */
- object_property_set_uint(OBJECT(cpu), def->level, "min-level",
+ object_property_set_uint(OBJECT(cpu), "min-level", def->level,
&error_abort);
- object_property_set_uint(OBJECT(cpu), def->xlevel, "min-xlevel",
+ object_property_set_uint(OBJECT(cpu), "min-xlevel", def->xlevel,
&error_abort);
- object_property_set_int(OBJECT(cpu), def->family, "family",
- &error_abort);
- object_property_set_int(OBJECT(cpu), def->model, "model",
+ object_property_set_int(OBJECT(cpu), "family", def->family, &error_abort);
+ object_property_set_int(OBJECT(cpu), "model", def->model, &error_abort);
+ object_property_set_int(OBJECT(cpu), "stepping", def->stepping,
&error_abort);
- object_property_set_int(OBJECT(cpu), def->stepping, "stepping",
- &error_abort);
- object_property_set_str(OBJECT(cpu), def->model_id, "model-id",
+ object_property_set_str(OBJECT(cpu), "model-id", def->model_id,
&error_abort);
for (w = 0; w < FEATURE_WORDS; w++) {
env->features[w] = def->features[w];
@@ -5166,8 +5164,7 @@ static void x86_cpu_load_model(X86CPU *cpu, X86CPUModel *model)
vendor = host_vendor;
}
- object_property_set_str(OBJECT(cpu), vendor, "vendor",
- &error_abort);
+ object_property_set_str(OBJECT(cpu), "vendor", vendor, &error_abort);
x86_cpu_apply_version_props(cpu, model);
}
@@ -5274,8 +5271,8 @@ static void object_apply_props(Object *obj, QDict *props, Error **errp)
Error *err = NULL;
for (prop = qdict_first(props); prop; prop = qdict_next(props, prop)) {
- object_property_set_qobject(obj, qdict_entry_value(prop),
- qdict_entry_key(prop), &err);
+ object_property_set_qobject(obj, qdict_entry_key(prop),
+ qdict_entry_value(prop), &err);
if (err) {
break;
}
@@ -6343,7 +6340,7 @@ static void x86_cpu_expand_features(X86CPU *cpu, Error **errp)
for (l = plus_features; l; l = l->next) {
const char *prop = l->data;
- object_property_set_bool(OBJECT(cpu), true, prop, &local_err);
+ object_property_set_bool(OBJECT(cpu), prop, true, &local_err);
if (local_err) {
goto out;
}
@@ -6351,7 +6348,7 @@ static void x86_cpu_expand_features(X86CPU *cpu, Error **errp)
for (l = minus_features; l; l = l->next) {
const char *prop = l->data;
- object_property_set_bool(OBJECT(cpu), false, prop, &local_err);
+ object_property_set_bool(OBJECT(cpu), prop, false, &local_err);
if (local_err) {
goto out;
}