From: David Gibson <david@gibson.dropbear.id.au>
To: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
Cc: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>,
qemu-ppc@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [PATCH] hw/pci-host/grackle: Verify PIC link is properly set
Date: Mon, 12 Oct 2020 09:34:46 +1100 [thread overview]
Message-ID: <20201011223446.GA4787@yekko.fritz.box> (raw)
In-Reply-To: <20201011190332.3189611-1-f4bug@amsat.org>
[-- Attachment #1: Type: text/plain, Size: 1322 bytes --]
On Sun, Oct 11, 2020 at 09:03:32PM +0200, Philippe Mathieu-Daudé wrote:
> 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.
I don't think thaqt's very likely, but, sure, applied to ppc-for-5.2
>
> 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,
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2020-10-11 23:56 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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é
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201011223446.GA4787@yekko.fritz.box \
--to=david@gibson.dropbear.id.au \
--cc=f4bug@amsat.org \
--cc=mark.cave-ayland@ilande.co.uk \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).