mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-12-17 21:26:13 -07:00
memory: add memory_region_is_ram()
Signed-off-by: Avi Kivity <avi@redhat.com>
This commit is contained in:
parent
62ec4832ea
commit
8ea9252abe
2 changed files with 18 additions and 0 deletions
10
memory.h
10
memory.h
|
|
@ -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.
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue