memory: add memory_region_is_ram()

Signed-off-by: Avi Kivity <avi@redhat.com>
This commit is contained in:
Avi Kivity 2011-12-08 15:58:43 +02:00
parent 62ec4832ea
commit 8ea9252abe
2 changed files with 18 additions and 0 deletions

View file

@ -122,6 +122,7 @@ struct MemoryRegion {
IORange iorange;
bool terminates;
bool readable;
bool ram;
bool readonly; /* For RAM regions */
bool enabled;
MemoryRegion *alias;
@ -266,6 +267,15 @@ void memory_region_destroy(MemoryRegion *mr);
*/
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.
*