提交 e34911c4 编写于 作者: A Avi Kivity

memory: temporarily add memory_region_get_ram_addr()

This is a layering violation, but needed while the code contains
naked calls to qemu_get_ram_ptr() and the like.
Signed-off-by: NAvi Kivity <avi@redhat.com>
上级 c65adf9b
......@@ -1435,6 +1435,12 @@ void memory_region_set_alias_offset(MemoryRegion *mr, target_phys_addr_t offset)
memory_region_update_topology(mr);
}
ram_addr_t memory_region_get_ram_addr(MemoryRegion *mr)
{
assert(mr->backend_registered);
return mr->ram_addr;
}
static int cmp_flatrange_addr(const void *addr_, const void *fr_)
{
const AddrRange *addr = addr_;
......
......@@ -558,6 +558,16 @@ void memory_region_add_subregion_overlap(MemoryRegion *mr,
target_phys_addr_t offset,
MemoryRegion *subregion,
unsigned priority);
/**
* memory_region_get_ram_addr: Get the ram address associated with a memory
* region
*
* DO NOT USE THIS FUCNTION. This is a temporary workaround while the Xen
* code is being reworked.
*/
ram_addr_t memory_region_get_ram_addr(MemoryRegion *mr);
/**
* memory_region_del_subregion: Remove a subregion.
*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册