diff mbox series

[2/4] hw/isa/lpc_ich9: Access memory regions via pci_address_space[_io]()

Message ID 20231011185954.10337-3-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/lpc_ich9.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Bernhard Beschow Oct. 16, 2023, 10:27 a.m. UTC | #1
Am 11. Oktober 2023 18:59:52 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-x86_64 -M q35 -S`. So:

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

>---
> hw/isa/lpc_ich9.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
>diff --git a/hw/isa/lpc_ich9.c b/hw/isa/lpc_ich9.c
>index 3f59980aa0..213b667f9b 100644
>--- a/hw/isa/lpc_ich9.c
>+++ b/hw/isa/lpc_ich9.c
>@@ -707,8 +707,8 @@ static void ich9_lpc_realize(PCIDevice *d, Error **errp)
>         return;
>     }
> 
>-    isa_bus = isa_bus_new(DEVICE(d), get_system_memory(), get_system_io(),
>-                          errp);
>+    isa_bus = isa_bus_new(DEVICE(d), pci_address_space(d),
>+                          pci_address_space_io(d), errp);
>     if (!isa_bus) {
>         return;
>     }
diff mbox series

Patch

diff --git a/hw/isa/lpc_ich9.c b/hw/isa/lpc_ich9.c
index 3f59980aa0..213b667f9b 100644
--- a/hw/isa/lpc_ich9.c
+++ b/hw/isa/lpc_ich9.c
@@ -707,8 +707,8 @@  static void ich9_lpc_realize(PCIDevice *d, Error **errp)
         return;
     }
 
-    isa_bus = isa_bus_new(DEVICE(d), get_system_memory(), get_system_io(),
-                          errp);
+    isa_bus = isa_bus_new(DEVICE(d), pci_address_space(d),
+                          pci_address_space_io(d), errp);
     if (!isa_bus) {
         return;
     }