diff mbox series

[1/4] hw/isa/i82378: Access memory regions via pci_address_space()

Message ID 20231011185954.10337-2-philmd@linaro.org
State New
Headers show
Series hw/pci: Have functions acess memory regions via pci_address_space() | expand

Commit Message

Philippe Mathieu-Daudé Oct. 11, 2023, 6:59 p.m. UTC
PCI functions are plugged on a PCI bus. They can only access
external memory regions via the bus.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 hw/isa/i82378.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Bernhard Beschow Oct. 15, 2023, 10:13 p.m. UTC | #1
Am 11. Oktober 2023 18:59:51 UTC schrieb "Philippe Mathieu-Daudé" <philmd@linaro.org>:
>PCI functions are plugged on a PCI bus. They can only access
>external memory regions via the bus.
>
>Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>

With `info mtree` and `info mtree -f` in the QEMU console before and after this patch I get the same results for `qemu-system-alpha -M clipper -S` and `qemu-system-ppc64 -M 40p -S`. So:

Reviewed-by: Bernhard Beschow <shentey@gmail.com>

>---
> hw/isa/i82378.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/hw/isa/i82378.c b/hw/isa/i82378.c
>index 63e0857208..95b45d0178 100644
>--- a/hw/isa/i82378.c
>+++ b/hw/isa/i82378.c
>@@ -76,7 +76,7 @@ static void i82378_realize(PCIDevice *pci, Error **errp)
> 
>     pci_config_set_interrupt_pin(pci_conf, 1); /* interrupt pin 0 */
> 
>-    isabus = isa_bus_new(dev, get_system_memory(),
>+    isabus = isa_bus_new(dev, pci_address_space(pci),
>                          pci_address_space_io(pci), errp);
>     if (!isabus) {
>         return;
diff mbox series

Patch

diff --git a/hw/isa/i82378.c b/hw/isa/i82378.c
index 63e0857208..95b45d0178 100644
--- a/hw/isa/i82378.c
+++ b/hw/isa/i82378.c
@@ -76,7 +76,7 @@  static void i82378_realize(PCIDevice *pci, Error **errp)
 
     pci_config_set_interrupt_pin(pci_conf, 1); /* interrupt pin 0 */
 
-    isabus = isa_bus_new(dev, get_system_memory(),
+    isabus = isa_bus_new(dev, pci_address_space(pci),
                          pci_address_space_io(pci), errp);
     if (!isabus) {
         return;