|
From: | Philippe Mathieu-Daudé |
Subject: | Re: [PATCH 3/4] hw/pci-host/bonito: Access memory regions via pci_address_space[_io]() |
Date: | Mon, 16 Oct 2023 09:04:17 +0200 |
User-agent: | Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 |
On 16/10/23 00:19, Bernhard Beschow wrote:
Am 11. Oktober 2023 18:59:53 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> --- hw/pci-host/bonito.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
@@ -719,7 +719,7 @@ static void bonito_pci_realize(PCIDevice *dev, Error **errp) memory_region_init_alias(pcimem_alias, NULL, "pci.mem.alias", &bs->pci_mem, 0, BONITO_PCIHI_SIZE); - memory_region_add_subregion(get_system_memory(), + memory_region_add_subregion(pci_address_space(dev),I need to keep `get_system_memory()` here to get the same results for `info mtree` in the QEMU console before and after this patch when running `qemu-system-mips64el -M fuloong2e -S`. The other two changes above seem to work as expected.
Good catch, thank you Bernhard!
[Prev in Thread] | Current Thread | [Next in Thread] |