diff options
| author | Peter Maydell <peter.maydell@linaro.org> | 2014-06-03 14:37:43 +0100 |
|---|---|---|
| committer | Peter Maydell <peter.maydell@linaro.org> | 2014-06-03 14:37:43 +0100 |
| commit | e00fcfeab3d452cba3d0a08991a39ab15df66424 (patch) | |
| tree | 443d02c8e6f51f9b6edff482d16ca116519bb030 /memory.c | |
| parent | 278073ba293d2b78641505f9c40e6f37c4a2f024 (diff) | |
| parent | 5e70018b00dbe59a96b80933a0dd308ee1ec4488 (diff) | |
| download | focaccia-qemu-e00fcfeab3d452cba3d0a08991a39ab15df66424.tar.gz focaccia-qemu-e00fcfeab3d452cba3d0a08991a39ab15df66424.zip | |
Merge remote-tracking branch 'remotes/awilliam/tags/vfio-pci-for-qemu-20140602.0' into staging
VFIO patches: realtek NIC quirk + SPAPR IOMMU AddressSpace support # gpg: Signature made Mon 02 Jun 2014 22:44:42 BST using RSA key ID 3BB08B22 # gpg: Can't check signature: public key not found * remotes/awilliam/tags/vfio-pci-for-qemu-20140602.0: vfio: Add guest side IOMMU support vfio: Create VFIOAddressSpace objects as needed vfio: Introduce VFIO address spaces vfio: Rework to have error paths vfio: Fix 128 bit handling int128: Add int128_exts64() memory: Sanity check that no listeners remain on a destroyed AddressSpace vfio-pci: Quirk RTL8168 NIC Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'memory.c')
| -rw-r--r-- | memory.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/memory.c b/memory.c index 3f1df238e2..678661e2bb 100644 --- a/memory.c +++ b/memory.c @@ -1722,12 +1722,19 @@ void address_space_init(AddressSpace *as, MemoryRegion *root, const char *name) void address_space_destroy(AddressSpace *as) { + MemoryListener *listener; + /* Flush out anything from MemoryListeners listening in on this */ memory_region_transaction_begin(); as->root = NULL; memory_region_transaction_commit(); QTAILQ_REMOVE(&address_spaces, as, address_spaces_link); address_space_destroy_dispatch(as); + + QTAILQ_FOREACH(listener, &memory_listeners, link) { + assert(listener->address_space_filter != as); + } + flatview_unref(as->current_map); g_free(as->name); g_free(as->ioeventfds); |