The real device has a default mapping which disappears as soon as an inbound
iATU is configured. Furthermore, inbound and outbound mappings are entirely
defined by iATUs. Remove the hardcoded mapping of PCI memory space to match
real hardware.

Note that the device model attempts to implement the default inbound mapping
by reusing an inbound iATU. However, Linux clears all iATUs during boot,
including the one purposefully set up by the device model, resulting in no
default mapping. This will be fixed in the next patch.

Signed-off-by: Bernhard Beschow <shen...@gmail.com>
---
 hw/pci-host/designware.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/hw/pci-host/designware.c b/hw/pci-host/designware.c
index 1e29b7e6be..2fd60a4817 100644
--- a/hw/pci-host/designware.c
+++ b/hw/pci-host/designware.c
@@ -703,8 +703,6 @@ static void designware_pcie_host_realize(DeviceState *dev, 
Error **errp)
                        OBJECT(s),
                        "pcie-bus-address-space-root",
                        UINT64_MAX);
-    memory_region_add_subregion(&s->pci.address_space_root,
-                                0x0, &s->pci.memory);
     address_space_init(&s->pci.address_space,
                        &s->pci.address_space_root,
                        "pcie-bus-address-space");
-- 
2.50.1


Reply via email to