summaryrefslogtreecommitdiff
path: root/hw/pci
diff options
context:
space:
mode:
authorAlexey Kardashevskiy <aik@ozlabs.ru>2013-04-29 16:25:51 +0000
committerPaolo Bonzini <pbonzini@redhat.com>2013-06-20 16:39:52 +0200
commit7dca8043f3483ff34ac954c7012b721731ee5719 (patch)
treefaf6a5ab138c5404bf40fc2600c33634915090ef /hw/pci
parentdf32fd1c9f53dd3b7abd28e29f851965039eabda (diff)
downloadqemu-7dca8043f3483ff34ac954c7012b721731ee5719.tar.gz
qemu-7dca8043f3483ff34ac954c7012b721731ee5719.tar.bz2
qemu-7dca8043f3483ff34ac954c7012b721731ee5719.zip
memory: give name to every AddressSpace
The "info mtree" command in QEMU console prints only "memory" and "I/O" address spaces while there are actually a lot more other AddressSpace structs created by PCI and VIO devices. Those devices do not normally have names and therefore not present in "info mtree" output. The patch fixes this. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/pci')
-rw-r--r--hw/pci/pci.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/pci/pci.c b/hw/pci/pci.c
index 104fe711b6..61b681a91f 100644
--- a/hw/pci/pci.c
+++ b/hw/pci/pci.c
@@ -814,7 +814,8 @@ static PCIDevice *do_pci_register_device(PCIDevice *pci_dev, PCIBus *bus,
memory_region_init_alias(&pci_dev->bus_master_enable_region, "bus master",
dma_as->root, 0, memory_region_size(dma_as->root));
memory_region_set_enabled(&pci_dev->bus_master_enable_region, false);
- address_space_init(&pci_dev->bus_master_as, &pci_dev->bus_master_enable_region);
+ address_space_init(&pci_dev->bus_master_as, &pci_dev->bus_master_enable_region,
+ name);
pci_dev->devfn = devfn;
pstrcpy(pci_dev->name, sizeof(pci_dev->name), name);