summary refs log tree commit diff stats
path: root/include/exec
diff options
context:
space:
mode:
authorIgor Mammedov <imammedo@redhat.com>2014-06-02 15:25:06 +0200
committerMichael S. Tsirkin <mst@redhat.com>2014-06-19 16:41:47 +0300
commiteed2bacfd2519e45498b585a147f11b0fd01c3c7 (patch)
tree8a78b44110e28a0ffc650258486fc4a990893609 /include/exec
parent10b7e74bf2de8587a8f9e15f216b87be43d6a7cf (diff)
downloadfocaccia-qemu-eed2bacfd2519e45498b585a147f11b0fd01c3c7.tar.gz
focaccia-qemu-eed2bacfd2519e45498b585a147f11b0fd01c3c7.zip
memory: add memory_region_is_mapped() API
which allows to check if MemoryRegion is already mapped.

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'include/exec')
-rw-r--r--include/exec/memory.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/exec/memory.h b/include/exec/memory.h
index 549ae734e6..f4c8d4933e 100644
--- a/include/exec/memory.h
+++ b/include/exec/memory.h
@@ -848,6 +848,14 @@ void memory_region_set_alias_offset(MemoryRegion *mr,
 bool memory_region_present(MemoryRegion *container, hwaddr addr);
 
 /**
+ * memory_region_is_mapped: returns true if #MemoryRegion is mapped
+ * into any address space.
+ *
+ * @mr: a #MemoryRegion which should be checked if it's mapped
+ */
+bool memory_region_is_mapped(MemoryRegion *mr);
+
+/**
  * memory_region_find: translate an address/size relative to a
  * MemoryRegion into a #MemoryRegionSection.
  *