[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 01/13] spapr_pci: Improve error message
From: |
David Gibson |
Subject: |
[Qemu-devel] [PULL 01/13] spapr_pci: Improve error message |
Date: |
Wed, 12 Jun 2019 15:49:17 +1000 |
From: Greg Kurz <address@hidden>
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 <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: David Gibson <address@hidden>
---
hw/ppc/spapr_pci.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c
index 9cf2c41b8c..483639b107 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;
}
--
2.21.0
- [Qemu-devel] [PULL 00/13] ppc-for-4.1 queue 20190612, David Gibson, 2019/06/12
- [Qemu-devel] [PULL 03/13] spapr: Clean up device node name generation for PCI devices, David Gibson, 2019/06/12
- [Qemu-devel] [PULL 02/13] target/ppc: Fix lxvw4x, lxvh8x and lxvb16x, David Gibson, 2019/06/12
- [Qemu-devel] [PULL 01/13] spapr_pci: Improve error message,
David Gibson <=
- [Qemu-devel] [PULL 09/13] spapr: Direct all PCI hotplug to host bridge, rather than P2P bridge, David Gibson, 2019/06/12
- [Qemu-devel] [PULL 04/13] spapr: Clean up device tree construction for PCI devices, David Gibson, 2019/06/12
- [Qemu-devel] [PULL 12/13] ppc/pnv: activate the "dumpdtb" option on the powernv machine, David Gibson, 2019/06/12
- [Qemu-devel] [PULL 08/13] spapr: Don't use bus number for building DRC ids, David Gibson, 2019/06/12
- [Qemu-devel] [PULL 13/13] ppc/xive: Make XIVE generate the proper interrupt types, David Gibson, 2019/06/12
- [Qemu-devel] [PULL 10/13] spapr: Allow hot plug/unplug of PCI bridges and devices under PCI bridges, David Gibson, 2019/06/12
- [Qemu-devel] [PULL 07/13] spapr: Clean up DRC index construction, David Gibson, 2019/06/12
- [Qemu-devel] [PULL 06/13] spapr: Clean up spapr_drc_populate_dt(), David Gibson, 2019/06/12
- [Qemu-devel] [PULL 05/13] spapr: Clean up dt creation for PCI buses, David Gibson, 2019/06/12
- [Qemu-devel] [PULL 11/13] target/ppc: Use tcg_gen_gvec_bitsel, David Gibson, 2019/06/12