diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2013-05-07 06:59:09 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2013-07-04 17:42:45 +0200 |
commit | 803c0816a7d3ab35460991ba5b7d1fccc070332b (patch) | |
tree | 11dbf5a0e9f6be80dba44b8828fb2601451b7862 /include | |
parent | b7e95164d1a9969aa591b8a72e05b94d08c49738 (diff) | |
download | qemu-803c0816a7d3ab35460991ba5b7d1fccc070332b.zip qemu-803c0816a7d3ab35460991ba5b7d1fccc070332b.tar.gz qemu-803c0816a7d3ab35460991ba5b7d1fccc070332b.tar.bz2 |
memory: add getter for owner
Whenever memory regions are accessed outside the BQL, they need to be
preserved against hot-unplug. MemoryRegions actually do not have their
own reference count; they piggyback on a QOM object, their "owner".
The owner is set at creation time, and there is a function to retrieve
the owner.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/exec/memory.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/exec/memory.h b/include/exec/memory.h index 3f48f07..2f3e8e4 100644 --- a/include/exec/memory.h +++ b/include/exec/memory.h @@ -382,6 +382,13 @@ void memory_region_init_iommu(MemoryRegion *mr, void memory_region_destroy(MemoryRegion *mr); /** + * memory_region_owner: get a memory region's owner. + * + * @mr: the memory region being queried. + */ +struct Object *memory_region_owner(MemoryRegion *mr); + +/** * memory_region_size: get a memory region's size. * * @mr: the memory region being queried. |