summaryrefslogtreecommitdiff
path: root/target-i386/cpu-qom.h
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2013-01-16 03:41:47 +0100
committerAndreas Färber <afaerber@suse.de>2013-02-16 14:50:56 +0100
commit2b6f294cacd9f4e133a7813d22e1b4e87ac6b2a3 (patch)
tree78bd9f703541dfe423f9fc4a96d7dc31eca89c49 /target-i386/cpu-qom.h
parent149692667f8a46430127ca0555b38965f52177f5 (diff)
downloadqemu-2b6f294cacd9f4e133a7813d22e1b4e87ac6b2a3.tar.gz
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>
Diffstat (limited to 'target-i386/cpu-qom.h')
-rw-r--r--target-i386/cpu-qom.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/target-i386/cpu-qom.h b/target-i386/cpu-qom.h
index 332916a185..48e6b54b1f 100644
--- a/target-i386/cpu-qom.h
+++ b/target-i386/cpu-qom.h
@@ -39,6 +39,7 @@
/**
* X86CPUClass:
+ * @parent_realize: The parent class' realize handler.
* @parent_reset: The parent class' reset handler.
*
* An x86 CPU model or family.
@@ -48,6 +49,7 @@ typedef struct X86CPUClass {
CPUClass parent_class;
/*< public >*/
+ DeviceRealize parent_realize;
void (*parent_reset)(CPUState *cpu);
} X86CPUClass;
@@ -72,8 +74,5 @@ static inline X86CPU *x86_env_get_cpu(CPUX86State *env)
#define ENV_GET_CPU(e) CPU(x86_env_get_cpu(e))
-/* TODO Drop once ObjectClass::realize is available */
-void x86_cpu_realize(Object *obj, Error **errp);
-
#endif