mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
target-i386: Update X86CPU to QOM realizefn
Adapt the signature of x86_cpu_realize(), hook up to DeviceClass::realize and set realized = true in cpu_x86_init(). The QOM realizefn cannot depend on errp being non-NULL as in cpu_x86_init(), so use a local Error to preserve error handling behavior on APIC initialization errors. Reviewed-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> [AF: Invoke parent's realizefn] Signed-off-by: Andreas Färber <afaerber@suse.de>
This commit is contained in:
parent
149692667f
commit
2b6f294cac
3 changed files with 18 additions and 8 deletions
|
@ -1282,7 +1282,7 @@ X86CPU *cpu_x86_init(const char *cpu_model)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
x86_cpu_realize(OBJECT(cpu), &error);
|
||||
object_property_set_bool(OBJECT(cpu), true, "realized", &error);
|
||||
if (error) {
|
||||
error_free(error);
|
||||
object_unref(OBJECT(cpu));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue