[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v3 01/24] xics: XICS should not be a SysBusDevice
From: |
Cédric Le Goater |
Subject: |
[Qemu-devel] [PATCH v3 01/24] xics: XICS should not be a SysBusDevice |
Date: |
Fri, 24 Feb 2017 11:18:00 +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>
---
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 5904e6498f49..8af54494f166 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 v3 00/24] ppc/xics: simplify ICS and ICP creation, Cédric Le Goater, 2017/02/24
- [Qemu-devel] [PATCH v3 01/24] xics: XICS should not be a SysBusDevice,
Cédric Le Goater <=
- [Qemu-devel] [PATCH v3 02/24] ppc/xics: fix ICP and ICS reset, Cédric Le Goater, 2017/02/24
- [Qemu-devel] [PATCH v3 03/24] ppc/xics: remove set_nr_irqs() handler from XICSStateClass, Cédric Le Goater, 2017/02/24
- [Qemu-devel] [PATCH v3 04/24] ppc/xics: remove set_nr_servers() handler from XICSStateClass, Cédric Le Goater, 2017/02/24
- [Qemu-devel] [PATCH v3 05/24] ppc/xics: store the ICS object under the sPAPR machine, Cédric Le Goater, 2017/02/24
- [Qemu-devel] [PATCH v3 06/24] ppc/xics: add an InterruptStatsProvider interface to ICS and ICP objects, Cédric Le Goater, 2017/02/24
- [Qemu-devel] [PATCH v3 07/24] ppc/xics: introduce a XICSFabric QOM interface to handle ICSs, Cédric Le Goater, 2017/02/24
- [Qemu-devel] [PATCH v3 08/24] ppc/xics: use the QOM interface under the sPAPR machine, Cédric Le Goater, 2017/02/24
- [Qemu-devel] [PATCH v3 09/24] ppc/xics: use the QOM interface to get irqs, Cédric Le Goater, 2017/02/24
- [Qemu-devel] [PATCH v3 10/24] ppc/xics: use the QOM interface to resend irqs, Cédric Le Goater, 2017/02/24
- [Qemu-devel] [PATCH v3 11/24] ppc/xics: remove xics_find_source(), Cédric Le Goater, 2017/02/24