diff options
author | Alexey Kardashevskiy <aik@ozlabs.ru> | 2013-04-29 16:25:51 +0000 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2013-06-20 16:39:52 +0200 |
commit | 7dca8043f3483ff34ac954c7012b721731ee5719 (patch) | |
tree | faf6a5ab138c5404bf40fc2600c33634915090ef /hw/ppc | |
parent | df32fd1c9f53dd3b7abd28e29f851965039eabda (diff) | |
download | qemu-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/ppc')
-rw-r--r-- | hw/ppc/spapr_pci.c | 4 | ||||
-rw-r--r-- | hw/ppc/spapr_vio.c | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c index 459398c1e5..04e836257c 100644 --- a/hw/ppc/spapr_pci.c +++ b/hw/ppc/spapr_pci.c @@ -650,7 +650,9 @@ static int spapr_phb_init(SysBusDevice *s) fprintf(stderr, "Unable to create TCE table for %s\n", sphb->dtbusname); return -1; } - address_space_init(&sphb->iommu_as, spapr_tce_get_iommu(sphb->tcet)); + address_space_init(&sphb->iommu_as, spapr_tce_get_iommu(sphb->tcet), + sphb->dtbusname); + pci_setup_iommu(bus, spapr_pci_dma_iommu, sphb); QLIST_INSERT_HEAD(&spapr->phbs, sphb, list); diff --git a/hw/ppc/spapr_vio.c b/hw/ppc/spapr_vio.c index 459c9f2a35..3c5a655ad7 100644 --- a/hw/ppc/spapr_vio.c +++ b/hw/ppc/spapr_vio.c @@ -454,7 +454,7 @@ static int spapr_vio_busdev_init(DeviceState *qdev) if (pc->rtce_window_size) { uint32_t liobn = SPAPR_VIO_BASE_LIOBN | dev->reg; dev->tcet = spapr_tce_new_table(liobn, pc->rtce_window_size); - address_space_init(&dev->as, spapr_tce_get_iommu(dev->tcet)); + address_space_init(&dev->as, spapr_tce_get_iommu(dev->tcet), qdev->id); } return pc->init(dev); |