[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH V7 03/16] spapr: add machine type specific instance
From: |
Jason Wang |
Subject: |
[Qemu-devel] [PATCH V7 03/16] spapr: add machine type specific instance init function |
Date: |
Thu, 23 Apr 2015 14:21:36 +0800 |
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 <address@hidden>
Cc: address@hidden
Signed-off-by: Jason Wang <address@hidden>
---
hw/ppc/spapr.c | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
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)
--
2.1.0
- [Qemu-devel] [PATCH V7 00/16] Support more virtio queues, Jason Wang, 2015/04/23
- [Qemu-devel] [PATCH V7 01/16] virtio-net: fix the upper bound when trying to delete queues, Jason Wang, 2015/04/23
- [Qemu-devel] [PATCH V7 02/16] pc: add 2.4 machine types, Jason Wang, 2015/04/23
- [Qemu-devel] [PATCH V7 03/16] spapr: add machine type specific instance init function,
Jason Wang <=
- [Qemu-devel] [PATCH V7 04/16] ppc: spapr: add 2.4 machine type, Jason Wang, 2015/04/23
- [Qemu-devel] [PATCH V7 05/16] monitor: replace the magic number 255 with MAX_QUEUE_NUM, Jason Wang, 2015/04/23
- [Qemu-devel] [PATCH V7 06/16] monitor: check return value of qemu_find_net_clients_except(), Jason Wang, 2015/04/23
- [Qemu-devel] [PATCH V7 07/16] virtio-ccw: using VIRTIO_NO_VECTOR instead of 0 for invalid virtqueue, Jason Wang, 2015/04/23
- [Qemu-devel] [PATCH V7 08/16] virtio: introduce bus specific queue limit, Jason Wang, 2015/04/23