All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] hw/pci-host/grackle: Verify PIC link is properly set
@ 2020-10-11 19:03 Philippe Mathieu-Daudé
  2020-10-11 22:34 ` David Gibson
  2020-10-12  9:23 ` Mark Cave-Ayland
  0 siblings, 2 replies; 17+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-10-11 19:03 UTC (permalink / raw)
  To: qemu-devel
  Cc: Mark Cave-Ayland, qemu-ppc, Philippe Mathieu-Daudé, David Gibson

The Grackle PCI host model expects the interrupt controller
being set, but does not verify it is present. Add a check to
help developers using this model.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 hw/pci-host/grackle.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/hw/pci-host/grackle.c b/hw/pci-host/grackle.c
index 57c29b20afb..20361d215ca 100644
--- a/hw/pci-host/grackle.c
+++ b/hw/pci-host/grackle.c
@@ -76,6 +76,10 @@ static void grackle_realize(DeviceState *dev, Error **errp)
     GrackleState *s = GRACKLE_PCI_HOST_BRIDGE(dev);
     PCIHostState *phb = PCI_HOST_BRIDGE(dev);
 
+    if (!s->pic) {
+        error_setg(errp, TYPE_GRACKLE_PCI_HOST_BRIDGE ": 'pic' link not set");
+        return;
+    }
     phb->bus = pci_register_root_bus(dev, NULL,
                                      pci_grackle_set_irq,
                                      pci_grackle_map_irq,
-- 
2.26.2



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

end of thread, other threads:[~2020-10-21 10:22 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-11 19:03 [PATCH] hw/pci-host/grackle: Verify PIC link is properly set Philippe Mathieu-Daudé
2020-10-11 22:34 ` David Gibson
2020-10-12  6:21   ` Philippe Mathieu-Daudé
2020-10-12  6:54     ` David Gibson
2020-10-12 11:50       ` BALATON Zoltan via
2020-10-12 12:00         ` Philippe Mathieu-Daudé
2020-10-19  7:50           ` Markus Armbruster
2020-10-19 11:11             ` BALATON Zoltan via
2020-10-19 14:00               ` Markus Armbruster
2020-10-19 14:38                 ` Mark Cave-Ayland
2020-10-19 16:17                   ` BALATON Zoltan via
2020-10-20  5:30                   ` Markus Armbruster
2020-10-20 11:37                     ` BALATON Zoltan via
2020-10-21  3:31                       ` Markus Armbruster
2020-10-21 10:21                         ` BALATON Zoltan via
2020-10-12  9:23 ` Mark Cave-Ayland
2020-10-12 12:01   ` Philippe Mathieu-Daudé

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.