From: Alexey Kardashevskiy <aik@ozlabs.ru>
To: qemu-devel@nongnu.org
Cc: "Alexey Kardashevskiy" <aik@ozlabs.ru>,
qemu-ppc@nongnu.org, "Alexander Graf" <agraf@suse.de>,
"Andreas Färber" <afaerber@suse.de>
Subject: [Qemu-devel] [PATCH v7 5/6] spapr: QOM'fy machine
Date: Mon, 17 Mar 2014 13:40:26 +1100 [thread overview]
Message-ID: <1395024027-29211-6-git-send-email-aik@ozlabs.ru> (raw)
In-Reply-To: <1395024027-29211-1-git-send-email-aik@ozlabs.ru>
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
---
Changes:
v8:
* QOM'ed according to the latest rules from 2.0-rc0.
---
hw/ppc/spapr.c | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index 5c9a154..43b9fcb 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -81,6 +81,8 @@
#define HTAB_SIZE(spapr) (1ULL << ((spapr)->htab_shift))
+#define TYPE_SPAPR_MACHINE "machine-spapr"
+
sPAPREnvironment *spapr;
int spapr_allocate_irq(int hint, bool lsi)
@@ -1416,3 +1418,24 @@ static void spapr_machine_init(void)
}
machine_init(spapr_machine_init);
+
+static void spapr_machine_class_init(ObjectClass *oc, void *data)
+{
+ MachineClass *mc = MACHINE_CLASS(oc);
+
+ mc->qemu_machine = data;
+}
+
+static const TypeInfo spapr_machine_info = {
+ .name = TYPE_SPAPR_MACHINE,
+ .parent = TYPE_MACHINE,
+ .class_init = spapr_machine_class_init,
+ .class_data = &spapr_machine,
+};
+
+static void spapr_machine_register_types(void)
+{
+ type_register_static(&spapr_machine_info);
+}
+
+type_init(spapr_machine_register_types)
--
1.8.4.rc4
next prev parent reply other threads:[~2014-03-17 2:41 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-17 2:40 [Qemu-devel] [PATCH v7 0/6] spapr: bootindex support Alexey Kardashevskiy
2014-03-17 2:40 ` [Qemu-devel] [PATCH v7 1/6] boot: extend get_boot_devices_list() to ignore suffixes Alexey Kardashevskiy
2014-03-17 2:40 ` [Qemu-devel] [PATCH v7 2/6] qdev: introduce FWPathProvider interface Alexey Kardashevskiy
2014-03-17 2:40 ` [Qemu-devel] [PATCH v7 3/6] spapr-llan: add to boot device list Alexey Kardashevskiy
2014-03-17 2:40 ` [Qemu-devel] [PATCH v7 4/6] spapr-vio: fix firmware names Alexey Kardashevskiy
2014-03-17 2:40 ` Alexey Kardashevskiy [this message]
2014-03-20 0:39 ` [Qemu-devel] [PATCH v7 5/6] spapr: QOM'fy machine Andreas Färber
2014-03-17 2:40 ` [Qemu-devel] [PATCH v7 6/6] spapr: define interface to fix device pathname Alexey Kardashevskiy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1395024027-29211-6-git-send-email-aik@ozlabs.ru \
--to=aik@ozlabs.ru \
--cc=afaerber@suse.de \
--cc=agraf@suse.de \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).