[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-ppc] [for-2.10 PATCH 0/3] spapr: fix PCI hotplug issue when PHBs d

From: Greg Kurz
Subject: [Qemu-ppc] [for-2.10 PATCH 0/3] spapr: fix PCI hotplug issue when PHBs don't have index
Date: Mon, 07 Aug 2017 19:24:24 +0200
User-agent: StGit/0.17.1-20-gc0b1b-dirty

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.


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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]