mirror of https://github.com/xemu-project/xemu.git
target-i386: Use cpu_generic_init() in cpu_x86_init()
Now cpu_x86_init() does nothing more or less than duplicating cpu_generic_init() logic. So simplify it by using cpu_generic_init(). Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
This commit is contained in:
parent
104494ea25
commit
a57d0163e7
|
@ -2226,25 +2226,7 @@ out:
|
||||||
|
|
||||||
X86CPU *cpu_x86_init(const char *cpu_model)
|
X86CPU *cpu_x86_init(const char *cpu_model)
|
||||||
{
|
{
|
||||||
Error *error = NULL;
|
return X86_CPU(cpu_generic_init(TYPE_X86_CPU, cpu_model));
|
||||||
X86CPU *cpu;
|
|
||||||
|
|
||||||
cpu = cpu_x86_create(cpu_model, &error);
|
|
||||||
if (error) {
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
|
|
||||||
object_property_set_bool(OBJECT(cpu), true, "realized", &error);
|
|
||||||
|
|
||||||
out:
|
|
||||||
if (error) {
|
|
||||||
error_report_err(error);
|
|
||||||
if (cpu != NULL) {
|
|
||||||
object_unref(OBJECT(cpu));
|
|
||||||
cpu = NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return cpu;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void x86_cpu_cpudef_class_init(ObjectClass *oc, void *data)
|
static void x86_cpu_cpudef_class_init(ObjectClass *oc, void *data)
|
||||||
|
|
Loading…
Reference in New Issue