[PATCH 12/16] hw/pci-host/raven: Fix PCI config direct access region

BALATON Zoltan posted 16 patches 7 months, 2 weeks ago
Maintainers: "Hervé Poussineau" <hpoussin@reactos.org>, "Michael S. Tsirkin" <mst@redhat.com>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
There is a newer version of this series
[PATCH 12/16] hw/pci-host/raven: Fix PCI config direct access region
Posted by BALATON Zoltan 7 months, 2 weeks ago
The PCI configuration direct access region occupies 8 MiB at offset
0x800000 in PCI IO space so model that accordingly.

Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
---
 hw/pci-host/raven.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/pci-host/raven.c b/hw/pci-host/raven.c
index 7550c291c6..318400c595 100644
--- a/hw/pci-host/raven.c
+++ b/hw/pci-host/raven.c
@@ -231,8 +231,8 @@ static void raven_pcihost_realizefn(DeviceState *d, Error **errp)
 
     mr = g_new0(MemoryRegion, 1);
     memory_region_init_io(mr, OBJECT(h), &raven_mmcfg_ops, h->bus,
-                          "pci-mmcfg", 0x00400000);
-    memory_region_add_subregion(address_space_mem, 0x80800000, mr);
+                          "pci-mmcfg", 8 * MiB);
+    memory_region_add_subregion(&s->pci_io, 0x800000, mr);
 
     memory_region_init_io(&s->pci_intack, OBJECT(s), &raven_intack_ops, s,
                           "pci-intack", 1);
-- 
2.41.3
Re: [PATCH 12/16] hw/pci-host/raven: Fix PCI config direct access region
Posted by Philippe Mathieu-Daudé 6 months, 2 weeks ago
On 4/5/25 18:01, BALATON Zoltan wrote:
> The PCI configuration direct access region occupies 8 MiB at offset
> 0x800000 in PCI IO space so model that accordingly.
> 
> Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
> ---
>   hw/pci-host/raven.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>