[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PATCH v3 02/24] ppc/xics: fix ICP and ICS reset
From: |
Cédric Le Goater |
Subject: |
[Qemu-ppc] [PATCH v3 02/24] ppc/xics: fix ICP and ICS reset |
Date: |
Fri, 24 Feb 2017 11:18:01 +0100 |
commit 5b17c7207938 ("xics: XICS should not be a SysBusDevice")
changed the nature of the XICS object to be a descendent of
TYPE_DEVICE. By doing so, the object is not on a bus and its reset
handler is not called anymore. The direct consequence is that the ICP
and ICS objects are not correctly initialized and so the IRQ subsystem
is broken in the guest.
Signed-off-by: Cédric Le Goater <address@hidden>
---
hw/ppc/spapr.c | 1 +
include/hw/ppc/xics.h | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index 8af54494f166..fa6a2947c791 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -104,6 +104,7 @@ static XICSState *try_create_xics(const char *type, int
nr_servers,
dev = DEVICE(object_new(type));
qdev_prop_set_uint32(dev, "nr_servers", nr_servers);
qdev_prop_set_uint32(dev, "nr_irqs", nr_irqs);
+ qdev_set_parent_bus(dev, sysbus_get_default());
object_property_set_bool(OBJECT(dev), true, "realized", &err);
if (err) {
error_propagate(errp, err);
diff --git a/include/hw/ppc/xics.h b/include/hw/ppc/xics.h
index 3f0c31610aa4..1aefd3d52257 100644
--- a/include/hw/ppc/xics.h
+++ b/include/hw/ppc/xics.h
@@ -80,7 +80,7 @@ struct XICSStateClass {
struct XICSState {
/*< private >*/
- SysBusDevice parent_obj;
+ DeviceState parent_obj;
/*< public >*/
uint32_t nr_servers;
uint32_t nr_irqs;
--
2.7.4
- [Qemu-ppc] [PATCH v3 00/24] ppc/xics: simplify ICS and ICP creation, Cédric Le Goater, 2017/02/24
- [Qemu-ppc] [PATCH v3 01/24] xics: XICS should not be a SysBusDevice, Cédric Le Goater, 2017/02/24
- [Qemu-ppc] [PATCH v3 02/24] ppc/xics: fix ICP and ICS reset,
Cédric Le Goater <=
- [Qemu-ppc] [PATCH v3 03/24] ppc/xics: remove set_nr_irqs() handler from XICSStateClass, Cédric Le Goater, 2017/02/24
- [Qemu-ppc] [PATCH v3 04/24] ppc/xics: remove set_nr_servers() handler from XICSStateClass, Cédric Le Goater, 2017/02/24
- [Qemu-ppc] [PATCH v3 05/24] ppc/xics: store the ICS object under the sPAPR machine, Cédric Le Goater, 2017/02/24
- [Qemu-ppc] [PATCH v3 06/24] ppc/xics: add an InterruptStatsProvider interface to ICS and ICP objects, Cédric Le Goater, 2017/02/24
- [Qemu-ppc] [PATCH v3 07/24] ppc/xics: introduce a XICSFabric QOM interface to handle ICSs, Cédric Le Goater, 2017/02/24
- [Qemu-ppc] [PATCH v3 08/24] ppc/xics: use the QOM interface under the sPAPR machine, Cédric Le Goater, 2017/02/24
- [Qemu-ppc] [PATCH v3 09/24] ppc/xics: use the QOM interface to get irqs, Cédric Le Goater, 2017/02/24
- [Qemu-ppc] [PATCH v3 10/24] ppc/xics: use the QOM interface to resend irqs, Cédric Le Goater, 2017/02/24
- [Qemu-ppc] [PATCH v3 11/24] ppc/xics: remove xics_find_source(), Cédric Le Goater, 2017/02/24
- [Qemu-ppc] [PATCH v3 12/24] ppc/xics: register the reset handler of ICS objects, Cédric Le Goater, 2017/02/24