qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] hw/pci-host: Allow extended config space access for Designware PCIe host
@ 2023-08-09 10:22 Jason Chien
  2023-08-09 21:24 ` Michael S. Tsirkin
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Jason Chien @ 2023-08-09 10:22 UTC (permalink / raw)
  To: qemu-devel, qemu-riscv
  Cc: Jason Chien, Peter Maydell, Andrey Smirnov, Michael S. Tsirkin,
	Greg Kurz, Philippe Mathieu-Daudé, Igor Mammedov, qemu-arm

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>
---
 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),
-- 
2.17.1



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

end of thread, other threads:[~2023-08-12  5:38 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-09 10:22 [PATCH] hw/pci-host: Allow extended config space access for Designware PCIe host Jason Chien
2023-08-09 21:24 ` Michael S. Tsirkin
2023-08-10 17:22   ` Jason Chien
2023-08-10 17:43     ` Michael S. Tsirkin
2023-08-10 17:46       ` Jason Chien
2023-08-10 17:51 ` Michael S. Tsirkin
2023-08-11  9:55   ` Peter Maydell
2023-08-11 14:06     ` Peter Maydell
2023-08-12  5:37       ` Jason Chien
2023-08-11  6:46 ` Frank Chang

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).