From: "Michael S. Tsirkin" <mst@redhat.com>
To: qemu-devel@nongnu.org
Cc: Peter Maydell <peter.maydell@linaro.org>,
Jason Chien <jason.chien@sifive.com>,
Frank Chang <frank.chang@sifive.com>,
Jason Wang <jasowang@redhat.com>,
Chien@redhat.com, <@redhat.com,
Andrey Smirnov <andrew.smirnov@gmail.com>,
qemu-arm@nongnu.org
Subject: [PULL 1/2] hw/pci-host: Allow extended config space access for Designware PCIe host
Date: Fri, 11 Aug 2023 12:18:02 -0400 [thread overview]
Message-ID: <3d449bc6030904ead784a4e4644c9640c2152796.1691770630.git.mst@redhat.com> (raw)
In-Reply-To: <cover.1691770630.git.mst@redhat.com>
From: Jason Chien <jason.chien@sifive.com>
In pcie_bus_realize(), a root bus is realized as a PCIe bus and a non-root
bus is realized as a PCIe bus if its parent bus is a PCIe bus. However,
the child bus "dw-pcie" is realized before the parent bus "pcie" which is
the root PCIe bus. Thus, the extended configuration space is not accessible
on "dw-pcie". The issue can be resolved by adding the
PCI_BUS_EXTENDED_CONFIG_SPACE flag to "pcie" before "dw-pcie" is realized.
Signed-off-by: Jason Chien <jason.chien@sifive.com>
Message-Id: <20230809102257.25121-1-jason.chien@sifive.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Frank Chang <frank.chang@sifive.com>
Signed-off-by: Jason Chien <<a href="mailto:jason.chien@sifive.com" target="_blank">jason.chien@sifive.com</a>><br>
---
hw/pci-host/designware.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/pci-host/designware.c b/hw/pci-host/designware.c
index 9e183caa48..388d252ee2 100644
--- a/hw/pci-host/designware.c
+++ b/hw/pci-host/designware.c
@@ -694,6 +694,7 @@ static void designware_pcie_host_realize(DeviceState *dev, Error **errp)
&s->pci.io,
0, 4,
TYPE_PCIE_BUS);
+ pci->bus->flags |= PCI_BUS_EXTENDED_CONFIG_SPACE;
memory_region_init(&s->pci.address_space_root,
OBJECT(s),
--
MST
next prev parent reply other threads:[~2023-08-11 16:18 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-11 16:17 [PULL 0/2] pci: last minute bugfixes Michael S. Tsirkin
2023-08-11 16:18 ` Michael S. Tsirkin [this message]
2023-08-11 17:30 ` [PULL 1/2] hw/pci-host: Allow extended config space access for Designware PCIe host Philippe Mathieu-Daudé
2023-08-11 16:18 ` [PULL 2/2] pci: Fix the update of interrupt disable bit in PCI_COMMAND register Michael S. Tsirkin
2023-08-11 17:41 ` [PULL 0/2] pci: last minute bugfixes Peter Maydell
2023-08-11 21:50 ` Richard Henderson
2023-08-12 18:06 ` Michael S. Tsirkin
2023-08-11 21:48 ` Richard Henderson
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=3d449bc6030904ead784a4e4644c9640c2152796.1691770630.git.mst@redhat.com \
--to=mst@redhat.com \
--cc=<@redhat.com \
--cc=Chien@redhat.com \
--cc=andrew.smirnov@gmail.com \
--cc=frank.chang@sifive.com \
--cc=jason.chien@sifive.com \
--cc=jasowang@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@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).