memory: add memory_region_is_ram()
Signed-off-by: Avi Kivity <avi@redhat.com>
diff --git a/memory.h b/memory.h
index fe643ff..dccc900 100644
--- a/memory.h
+++ b/memory.h
@@ -122,6 +122,7 @@
IORange iorange;
bool terminates;
bool readable;
+ bool ram;
bool readonly; /* For RAM regions */
bool enabled;
MemoryRegion *alias;
@@ -267,6 +268,15 @@
uint64_t memory_region_size(MemoryRegion *mr);
/**
+ * memory_region_is_ram: check whether a memory region is random access
+ *
+ * Returns %true is a memory region is random access.
+ *
+ * @mr: the memory region being queried
+ */
+bool memory_region_is_ram(MemoryRegion *mr);
+
+/**
* memory_region_get_ram_ptr: Get a pointer into a RAM memory region.
*
* Returns a host pointer to a RAM memory region (created with