* [Qemu-devel] [PATCH] ppc: QOMified g3beige machine
@ 2016-09-21 15:06 Laurent Vivier
2016-09-21 15:41 ` Laurent Vivier
0 siblings, 1 reply; 2+ messages in thread
From: Laurent Vivier @ 2016-09-21 15:06 UTC (permalink / raw)
To: agraf; +Cc: david, qemu-ppc, qemu-devel, Laurent Vivier
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
---
hw/ppc/mac_oldworld.c | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/hw/ppc/mac_oldworld.c b/hw/ppc/mac_oldworld.c
index 4479487..16a9600 100644
--- a/hw/ppc/mac_oldworld.c
+++ b/hw/ppc/mac_oldworld.c
@@ -363,8 +363,10 @@ static int heathrow_kvm_type(const char *arg)
return 2;
}
-static void heathrow_machine_init(MachineClass *mc)
+static void heathrow_machine_class_init(ObjectClass *oc, void *data)
{
+ MachineClass *mc = MACHINE_CLASS(oc);
+
mc->desc = "Heathrow based PowerMAC";
mc->init = ppc_heathrow_init;
mc->max_cpus = MAX_CPUS;
@@ -376,4 +378,15 @@ static void heathrow_machine_init(MachineClass *mc)
mc->kvm_type = heathrow_kvm_type;
}
-DEFINE_MACHINE("g3beige", heathrow_machine_init)
+static const TypeInfo heathrow_machine_info = {
+ .name = MACHINE_TYPE_NAME("g3beige"),
+ .parent = TYPE_MACHINE,
+ .class_init = heathrow_machine_class_init,
+};
+
+static void heathrow_machine_register_types(void)
+{
+ type_register_static(&heathrow_machine_info);
+}
+
+type_init(heathrow_machine_register_types)
--
2.5.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH] ppc: QOMified g3beige machine
2016-09-21 15:06 [Qemu-devel] [PATCH] ppc: QOMified g3beige machine Laurent Vivier
@ 2016-09-21 15:41 ` Laurent Vivier
0 siblings, 0 replies; 2+ messages in thread
From: Laurent Vivier @ 2016-09-21 15:41 UTC (permalink / raw)
To: agraf; +Cc: david, qemu-ppc, qemu-devel
On 21/09/2016 17:06, Laurent Vivier wrote:
> Signed-off-by: Laurent Vivier <lvivier@redhat.com>
> ---
> hw/ppc/mac_oldworld.c | 17 +++++++++++++++--
> 1 file changed, 15 insertions(+), 2 deletions(-)
Forget it, this is stupid: this is already what is doing DEFINE_MACHINE().
Laurent
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-09-21 15:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-21 15:06 [Qemu-devel] [PATCH] ppc: QOMified g3beige machine Laurent Vivier
2016-09-21 15:41 ` Laurent Vivier
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.