summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorMarcel Apfelbaum <marcel@redhat.com>2015-01-06 15:29:15 +0200
committerPeter Maydell <peter.maydell@linaro.org>2015-01-08 17:32:27 +0000
commitb1c2fb9b29c325a6944ce4ddddef9fe7e9af26bd (patch)
treefa570c8975d258931f328937527cc335f569b530 /hw
parentde77a243b3e703adae0a5c981914ff87cb99bdf6 (diff)
downloadqemu-b1c2fb9b29c325a6944ce4ddddef9fe7e9af26bd.tar.gz
qemu-b1c2fb9b29c325a6944ce4ddddef9fe7e9af26bd.tar.bz2
qemu-b1c2fb9b29c325a6944ce4ddddef9fe7e9af26bd.zip
hw/ppc/mac_newworld: QOMified mac99 machines
Signed-off-by: Marcel Apfelbaum <marcel@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Alexander Graf <agraf@suse.de> Message-id: 1420550957-22337-5-git-send-email-marcel@redhat.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw')
-rw-r--r--hw/ppc/mac_newworld.c29
1 files changed, 19 insertions, 10 deletions
diff --git a/hw/ppc/mac_newworld.c b/hw/ppc/mac_newworld.c
index ed37d6bf19..b54f94ad53 100644
--- a/hw/ppc/mac_newworld.c
+++ b/hw/ppc/mac_newworld.c
@@ -502,18 +502,27 @@ static int core99_kvm_type(const char *arg)
return 2;
}
-static QEMUMachine core99_machine = {
- .name = "mac99",
- .desc = "Mac99 based PowerMAC",
- .init = ppc_core99_init,
- .max_cpus = MAX_CPUS,
- .default_boot_order = "cd",
- .kvm_type = core99_kvm_type,
+static void core99_machine_class_init(ObjectClass *oc, void *data)
+{
+ MachineClass *mc = MACHINE_CLASS(oc);
+
+ mc->name = "mac99";
+ mc->desc = "Mac99 based PowerMAC";
+ mc->init = ppc_core99_init;
+ mc->max_cpus = MAX_CPUS;
+ mc->default_boot_order = "cd";
+ mc->kvm_type = core99_kvm_type;
+}
+
+static const TypeInfo core99_machine_info = {
+ .name = "mac99-machine",
+ .parent = TYPE_MACHINE,
+ .class_init = core99_machine_class_init,
};
-static void core99_machine_init(void)
+static void mac_machine_register_types(void)
{
- qemu_register_machine(&core99_machine);
+ type_register_static(&core99_machine_info);
}
-machine_init(core99_machine_init);
+type_init(mac_machine_register_types)