While working on PHB hotplug for 2.11, a bug was discovered in the PCI DR logic in the PHB code: it relies on the PHB index property to be set but it doesn't enforce it. It is hence possible to create two PHBs with the same index (ie, the default value -1), even though this isn't expected by the rest of the PHB code. The most visible consequence, is that PCI hotplug doesn't work anymore.
It was agreed that the right fix would be to make the index property mandatory. This is too an intrusive change to do during soft/hard freeze though. It is postponed for 2.11. In the meantime, we can at least have QEMU to detect the error early and to exit with an error message, instead of silently going on with half-broken PHBs. David, These patches were made with the future work on PHB hotplug in mind. If the series is too long, a similar result can be achieved with this single change in spapr_dr_connector_new(): - object_property_set_bool(OBJECT(drc), true, "realized", NULL); + object_property_set_bool(OBJECT(drc), true, "realized", &error_fatal); Just tell me, if you prefer the shorter version. -- Greg --- Greg Kurz (3): spapr_drc: abort if object_property_add_child() fails spapr_drc: add Error ** argument to spapr_dr_connector_new() spapr: error out if PHB fails to setup PCI DRCs hw/ppc/spapr.c | 4 ++-- hw/ppc/spapr_drc.c | 6 +++--- hw/ppc/spapr_pci.c | 8 +++++++- include/hw/ppc/spapr_drc.h | 2 +- 4 files changed, 13 insertions(+), 7 deletions(-)