This is a layering violation, but needed while the code contains naked calls to qemu_get_ram_ptr() and the like. Signed-off-by: Avi Kivity <avi@xxxxxxxxxx> --- memory.c | 6 ++++++ memory.h | 10 ++++++++++ 2 files changed, 16 insertions(+), 0 deletions(-) diff --git a/memory.c b/memory.c index 2dcbf80..41a106a 100644 --- a/memory.c +++ b/memory.c @@ -1376,6 +1376,12 @@ void memory_region_del_subregion(MemoryRegion *mr, memory_region_update_topology(); } +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; diff --git a/memory.h b/memory.h index b7d39ed..1e44d86 100644 --- a/memory.h +++ b/memory.h @@ -557,6 +557,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. * -- 1.7.7.1 -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html