diff options
author | Jason Wang <jasowang@redhat.com> | 2015-04-23 14:21:36 +0800 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2015-04-27 20:49:46 +0200 |
commit | b0e966d0209fa5c93d510d1756a87dd4229b1f8a (patch) | |
tree | 3d189a83d3d4c9ebc3d550dccf86dfd403d738b2 /hw | |
parent | 5cb50e0acc7ba6063b87664404103cce217c0493 (diff) | |
download | qemu-b0e966d0209fa5c93d510d1756a87dd4229b1f8a.zip qemu-b0e966d0209fa5c93d510d1756a87dd4229b1f8a.tar.gz qemu-b0e966d0209fa5c93d510d1756a87dd4229b1f8a.tar.bz2 |
spapr: add machine type specific instance init function
This patches adds machine type specific instance initialization
functions. Those functions will be used by following patches to compat
class properties for legacy machine types.
Cc: Alexander Graf <agraf@suse.de>
Cc: qemu-ppc@nongnu.org
Signed-off-by: Jason Wang <jasowang@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/ppc/spapr.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 61ddc79..9e676ef 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -1825,6 +1825,27 @@ static const TypeInfo spapr_machine_info = { #define SPAPR_COMPAT_2_1 \ SPAPR_COMPAT_2_2 +static void spapr_compat_2_2(Object *obj) +{ +} + +static void spapr_compat_2_1(Object *obj) +{ + spapr_compat_2_2(obj); +} + +static void spapr_machine_2_2_instance_init(Object *obj) +{ + spapr_compat_2_2(obj); + spapr_machine_initfn(obj); +} + +static void spapr_machine_2_1_instance_init(Object *obj) +{ + spapr_compat_2_1(obj); + spapr_machine_initfn(obj); +} + static void spapr_machine_2_1_class_init(ObjectClass *oc, void *data) { MachineClass *mc = MACHINE_CLASS(oc); @@ -1843,6 +1864,7 @@ static const TypeInfo spapr_machine_2_1_info = { .name = TYPE_SPAPR_MACHINE "2.1", .parent = TYPE_SPAPR_MACHINE, .class_init = spapr_machine_2_1_class_init, + .instance_init = spapr_machine_2_1_instance_init, }; static void spapr_machine_2_2_class_init(ObjectClass *oc, void *data) @@ -1862,6 +1884,7 @@ static const TypeInfo spapr_machine_2_2_info = { .name = TYPE_SPAPR_MACHINE "2.2", .parent = TYPE_SPAPR_MACHINE, .class_init = spapr_machine_2_2_class_init, + .instance_init = spapr_machine_2_2_instance_init, }; static void spapr_machine_2_3_class_init(ObjectClass *oc, void *data) |