Replace legacy's reset call by device_reset_warm. The new function propagates also the reset to the sub-buses tree.
In spapr_vio.c, the function resets a SpaprtceTable which does not seem to have child bus so it should have no impact. In Spapr_pci.c the functions resets QOM children devices of a SpaprPhbState. If there is a device with a child bus, then this bus will now be reset (and all its qdev tree). Signed-off-by: Damien Hedde <damien.he...@greensocs.com> --- hw/ppc/spapr_pci.c | 2 +- hw/ppc/spapr_vio.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c index 3c6cf79a5e..946b2b4483 100644 --- a/hw/ppc/spapr_pci.c +++ b/hw/ppc/spapr_pci.c @@ -2029,7 +2029,7 @@ static int spapr_phb_children_reset(Object *child, void *opaque) DeviceState *dev = (DeviceState *) object_dynamic_cast(child, TYPE_DEVICE); if (dev) { - device_legacy_reset(dev); + device_reset_warm(dev); } return 0; diff --git a/hw/ppc/spapr_vio.c b/hw/ppc/spapr_vio.c index 5a0b5cc35c..41c17cfdd6 100644 --- a/hw/ppc/spapr_vio.c +++ b/hw/ppc/spapr_vio.c @@ -306,7 +306,7 @@ int spapr_vio_send_crq(SpaprVioDevice *dev, uint8_t *crq) static void spapr_vio_quiesce_one(SpaprVioDevice *dev) { if (dev->tcet) { - device_legacy_reset(DEVICE(dev->tcet)); + device_reset_warm(DEVICE(dev->tcet)); } free_crq(dev); } -- 2.22.0