diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2014-08-19 13:00:57 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2014-08-19 13:00:57 +0100 |
commit | 0e4a77370594c91dd126f9872893ed473374cc72 (patch) | |
tree | 821715343d4c22b6e71d98676b51e63d59466c55 /hw/misc | |
parent | 8e6e2c2ae7a81f625cf1cb320891d5270e277548 (diff) | |
parent | f54bb15f9d373877954e44db3a8bb368aff45b42 (diff) |
Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging
SCSI changes that enable sending vendor-specific commands via virtio-scsi.
Memory changes for QOMification and automatic tracking of MR lifetime.
# gpg: Signature made Mon 18 Aug 2014 13:03:09 BST using RSA key ID 9B4D86F2
# gpg: Good signature from "Paolo Bonzini <pbonzini@redhat.com>"
# gpg: aka "Paolo Bonzini <bonzini@gnu.org>"
* remotes/bonzini/tags/for-upstream:
mtree: remove write-only field
memory: Use canonical path component as the name
memory: Use memory_region_name for name access
memory: constify memory_region_name
exec: Abstract away ref to memory region names
loader: Abstract away ref to memory region names
tpm_tis: remove instance_finalize callback
memory: remove memory_region_destroy
memory: convert memory_region_destroy to object_unparent
ioport: split deletion and destruction
nic: do not destroy memory regions in cleanup functions
vga: do not dynamically allocate chain4_alias
sysbus: remove unused function sysbus_del_io
qom: object: move unparenting to the child property's release callback
qom: object: delete properties before calling instance_finalize
virtio-scsi: implement parse_cdb
scsi-block, scsi-generic: implement parse_cdb
scsi-block: extract scsi_block_is_passthrough
scsi-bus: introduce parse_cdb in SCSIDeviceClass and SCSIBusInfo
scsi-bus: prepare scsi_req_new for introduction of parse_cdb
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/misc')
-rw-r--r-- | hw/misc/ivshmem.c | 3 | ||||
-rw-r--r-- | hw/misc/omap_gpmc.c | 2 | ||||
-rw-r--r-- | hw/misc/pci-testdev.c | 2 | ||||
-rw-r--r-- | hw/misc/vfio.c | 11 |
4 files changed, 3 insertions, 15 deletions
diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c index d3e1195066..bd9d7182af 100644 --- a/hw/misc/ivshmem.c +++ b/hw/misc/ivshmem.c @@ -793,11 +793,8 @@ static void pci_ivshmem_uninit(PCIDevice *dev) error_free(s->migration_blocker); } - memory_region_destroy(&s->ivshmem_mmio); memory_region_del_subregion(&s->bar, &s->ivshmem); vmstate_unregister_ram(&s->ivshmem, DEVICE(dev)); - memory_region_destroy(&s->ivshmem); - memory_region_destroy(&s->bar); unregister_savevm(DEVICE(dev), "ivshmem", s); } diff --git a/hw/misc/omap_gpmc.c b/hw/misc/omap_gpmc.c index cddea241d4..fbbe2ff993 100644 --- a/hw/misc/omap_gpmc.c +++ b/hw/misc/omap_gpmc.c @@ -436,7 +436,7 @@ static void omap_gpmc_cs_unmap(struct omap_gpmc_s *s, int cs) } memory_region_del_subregion(get_system_memory(), &f->container); memory_region_del_subregion(&f->container, omap_gpmc_cs_memregion(s, cs)); - memory_region_destroy(&f->container); + object_unparent(OBJECT(&f->container)); } void omap_gpmc_reset(struct omap_gpmc_s *s) diff --git a/hw/misc/pci-testdev.c b/hw/misc/pci-testdev.c index ca53b3f500..c78a63e3a7 100644 --- a/hw/misc/pci-testdev.c +++ b/hw/misc/pci-testdev.c @@ -293,8 +293,6 @@ pci_testdev_uninit(PCIDevice *dev) g_free(d->tests[i].hdr); } g_free(d->tests); - memory_region_destroy(&d->mmio); - memory_region_destroy(&d->portio); } static void qdev_pci_testdev_reset(DeviceState *dev) diff --git a/hw/misc/vfio.c b/hw/misc/vfio.c index ba08adbd99..0617b70ea6 100644 --- a/hw/misc/vfio.c +++ b/hw/misc/vfio.c @@ -2282,7 +2282,7 @@ static void vfio_vga_quirk_teardown(VFIODevice *vdev) while (!QLIST_EMPTY(&vdev->vga.region[i].quirks)) { VFIOQuirk *quirk = QLIST_FIRST(&vdev->vga.region[i].quirks); memory_region_del_subregion(&vdev->vga.region[i].mem, &quirk->mem); - memory_region_destroy(&quirk->mem); + object_unparent(OBJECT(&quirk->mem)); QLIST_REMOVE(quirk, next); g_free(quirk); } @@ -2306,7 +2306,7 @@ static void vfio_bar_quirk_teardown(VFIODevice *vdev, int nr) while (!QLIST_EMPTY(&bar->quirks)) { VFIOQuirk *quirk = QLIST_FIRST(&bar->quirks); memory_region_del_subregion(&bar->mem, &quirk->mem); - memory_region_destroy(&quirk->mem); + object_unparent(OBJECT(&quirk->mem)); QLIST_REMOVE(quirk, next); g_free(quirk); } @@ -2873,15 +2873,11 @@ static void vfio_unmap_bar(VFIODevice *vdev, int nr) memory_region_del_subregion(&bar->mem, &bar->mmap_mem); munmap(bar->mmap, memory_region_size(&bar->mmap_mem)); - memory_region_destroy(&bar->mmap_mem); if (vdev->msix && vdev->msix->table_bar == nr) { memory_region_del_subregion(&bar->mem, &vdev->msix->mmap_mem); munmap(vdev->msix->mmap, memory_region_size(&vdev->msix->mmap_mem)); - memory_region_destroy(&vdev->msix->mmap_mem); } - - memory_region_destroy(&bar->mem); } static int vfio_mmap_bar(VFIODevice *vdev, VFIOBAR *bar, @@ -3034,9 +3030,6 @@ static void vfio_unmap_bars(VFIODevice *vdev) if (vdev->has_vga) { vfio_vga_quirk_teardown(vdev); pci_unregister_vga(&vdev->pdev); - memory_region_destroy(&vdev->vga.region[QEMU_PCI_VGA_MEM].mem); - memory_region_destroy(&vdev->vga.region[QEMU_PCI_VGA_IO_LO].mem); - memory_region_destroy(&vdev->vga.region[QEMU_PCI_VGA_IO_HI].mem); } } |