qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [for-2.10 PATCH 0/3] spapr: fix PCI hotplug issue when PHBs don't have index
@ 2017-08-07 17:24 Greg Kurz
  2017-08-07 17:24 ` [Qemu-devel] [for-2.10 PATCH 1/3] spapr_drc: abort if object_property_add_child() fails Greg Kurz
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Greg Kurz @ 2017-08-07 17:24 UTC (permalink / raw)
  To: qemu-devel
  Cc: Alexey Kardashevskiy, Michael Roth, qemu-ppc, Bharata B Rao,
	Daniel Henrique Barboza, David Gibson

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(-)

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2017-08-09  4:03 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-07 17:24 [Qemu-devel] [for-2.10 PATCH 0/3] spapr: fix PCI hotplug issue when PHBs don't have index Greg Kurz
2017-08-07 17:24 ` [Qemu-devel] [for-2.10 PATCH 1/3] spapr_drc: abort if object_property_add_child() fails Greg Kurz
2017-08-08  6:09   ` David Gibson
2017-08-07 17:24 ` [Qemu-devel] [for-2.10 PATCH 2/3] spapr_drc: add Error ** argument to spapr_dr_connector_new() Greg Kurz
2017-08-07 17:25 ` [Qemu-devel] [for-2.10 PATCH 3/3] spapr: error out if PHB fails to setup PCI DRCs Greg Kurz
2017-08-08  6:16   ` David Gibson
2017-08-08  9:18     ` Greg Kurz
2017-08-09  3:33       ` David Gibson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).