Skip to content

Commit

Permalink
spapr/pci: Correct "does not support hotplugging error messages
Browse files Browse the repository at this point in the history
When dynamic-reconfiguration is off, hot plug / unplug can fail with
"Bus 'spapr-pci-host-bridge' does not support hotplugging".
spapr-pci-host-bridge is a device, not a bus.  Report the name of the
bus it provides instead: 'pci.0'.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-ID: <20231031111059.3407803-2-armbru@redhat.com>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
  • Loading branch information
Markus Armbruster committed Nov 17, 2023
1 parent 34a5cb6 commit db8227a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hw/ppc/spapr_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -1555,7 +1555,7 @@ static void spapr_pci_pre_plug(HotplugHandler *plug_handler,
*/
if (plugged_dev->hotplugged) {
error_setg(errp, QERR_BUS_NO_HOTPLUG,
object_get_typename(OBJECT(phb)));
phb->parent_obj.bus->qbus.name);
return;
}
}
Expand Down Expand Up @@ -1676,7 +1676,7 @@ static void spapr_pci_unplug_request(HotplugHandler *plug_handler,

if (!phb->dr_enabled) {
error_setg(errp, QERR_BUS_NO_HOTPLUG,
object_get_typename(OBJECT(phb)));
phb->parent_obj.bus->qbus.name);
return;
}

Expand Down

0 comments on commit db8227a

Please sign in to comment.