[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v4 01/26] xics: XICS should not be a SysBusDevice
From: |
Cédric Le Goater |
Subject: |
[Qemu-devel] [PATCH v4 01/26] xics: XICS should not be a SysBusDevice |
Date: |
Mon, 27 Feb 2017 15:29:08 +0100 |
From: David Gibson <address@hidden>
Currently xics - the component of the IBM POWER interrupt controller
representing the overall interrupt fabric / architecture is
represented as a descendent of SysBusDevice. However, this is not
really correct - the xics presents nothing in MMIO space so it should
be an "unattached" device in the current QOM model.
Since this device will always be created by the machine type, not created
specifically from the command line, and because it has no migrated state
it should be safe to move it around the device composition tree.
Therefore this patch changes it to a descendent of TYPE_DEVICE, and makes
it an unattached device.
Signed-off-by: David Gibson <address@hidden>
Reviewed-by: Cédric Le Goater <address@hidden>
Signed-off-by: Cédric Le Goater <address@hidden>
---
hw/intc/xics.c | 2 +-
hw/ppc/spapr.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/intc/xics.c b/hw/intc/xics.c
index 095c16a30082..372b8311fb8b 100644
--- a/hw/intc/xics.c
+++ b/hw/intc/xics.c
@@ -260,7 +260,7 @@ static void xics_common_class_init(ObjectClass *oc, void
*data)
static const TypeInfo xics_common_info = {
.name = TYPE_XICS_COMMON,
- .parent = TYPE_SYS_BUS_DEVICE,
+ .parent = TYPE_DEVICE,
.instance_size = sizeof(XICSState),
.class_size = sizeof(XICSStateClass),
.instance_init = xics_common_initfn,
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index 0b57aade3f83..ceefbb57d0ac 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -101,7 +101,7 @@ static XICSState *try_create_xics(const char *type, int
nr_servers,
Error *err = NULL;
DeviceState *dev;
- dev = qdev_create(NULL, type);
+ dev = DEVICE(object_new(type));
qdev_prop_set_uint32(dev, "nr_servers", nr_servers);
qdev_prop_set_uint32(dev, "nr_irqs", nr_irqs);
object_property_set_bool(OBJECT(dev), true, "realized", &err);
--
2.7.4
- [Qemu-devel] [PATCH v4 00/26] ppc/xics: simplify ICS and ICP creation, Cédric Le Goater, 2017/02/27
- [Qemu-devel] [PATCH v4 01/26] xics: XICS should not be a SysBusDevice,
Cédric Le Goater <=
- [Qemu-devel] [PATCH v4 02/26] ppc/xics: fix ICP and ICS reset, Cédric Le Goater, 2017/02/27
- [Qemu-devel] [PATCH v4 03/26] ppc/xics: remove set_nr_irqs() handler from XICSStateClass, Cédric Le Goater, 2017/02/27
- [Qemu-devel] [PATCH v4 04/26] ppc/xics: remove set_nr_servers() handler from XICSStateClass, Cédric Le Goater, 2017/02/27
- [Qemu-devel] [PATCH v4 05/26] ppc/xics: store the ICS object under the sPAPR machine, Cédric Le Goater, 2017/02/27
- [Qemu-devel] [PATCH v4 06/26] ppc/xics: add an InterruptStatsProvider interface to ICS and ICP objects, Cédric Le Goater, 2017/02/27
- [Qemu-devel] [PATCH v4 07/26] ppc/xics: introduce a XICSFabric QOM interface to handle ICSs, Cédric Le Goater, 2017/02/27
- [Qemu-devel] [PATCH v4 09/26] ppc/xics: use the QOM interface to get irqs, Cédric Le Goater, 2017/02/27
- [Qemu-devel] [PATCH v4 08/26] ppc/xics: use the QOM interface under the sPAPR machine, Cédric Le Goater, 2017/02/27