diff options
author | Greg Kurz <groug@kaod.org> | 2019-05-29 19:15:09 +0200 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2019-06-12 10:41:49 +1000 |
commit | 70282930173797afed352b82b4710233948c7495 (patch) | |
tree | 434c1da6b0bf7be6b898d8dfb96defd68ed484a3 /hw | |
parent | 219dca61ebf41625831d4f96a720852baf44b762 (diff) | |
download | qemu-70282930173797afed352b82b4710233948c7495.zip qemu-70282930173797afed352b82b4710233948c7495.tar.gz qemu-70282930173797afed352b82b4710233948c7495.tar.bz2 |
spapr_pci: Improve error message
Every PHB must have a unique index. This is checked at realize but when
a duplicate index is detected, an error message mentioning BUIDs is
printed. This doesn't help much, especially since BUID is an internal
concept that is no longer exposed to the user.
Fix the message to mention the index property instead of BUID. As a bonus
print a list of indexes already in use.
Signed-off-by: Greg Kurz <groug@kaod.org>
Message-Id: <155915010892.2061314.10485622810149098411.stgit@bahia.lan>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/ppc/spapr_pci.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c index 9cf2c41..483639b 100644 --- a/hw/ppc/spapr_pci.c +++ b/hw/ppc/spapr_pci.c @@ -1677,7 +1677,14 @@ static void spapr_phb_realize(DeviceState *dev, Error **errp) } if (spapr_pci_find_phb(spapr, sphb->buid)) { - error_setg(errp, "PCI host bridges must have unique BUIDs"); + SpaprPhbState *s; + + error_setg(errp, "PCI host bridges must have unique indexes"); + error_append_hint(errp, "The following indexes are already in use:"); + QLIST_FOREACH(s, &spapr->phbs, list) { + error_append_hint(errp, " %d", s->index); + } + error_append_hint(errp, "\nTry another value for the index property\n"); return; } |