]> git.proxmox.com Git - qemu.git/commit - memory.c
memory: introduce memory_region_find()
authorAvi Kivity <avi@redhat.com>
Thu, 8 Dec 2011 13:00:18 +0000 (15:00 +0200)
committerAvi Kivity <avi@redhat.com>
Tue, 20 Dec 2011 12:14:07 +0000 (14:14 +0200)
commite2177955a899483b19bd54e547db3b61db95eaf7
treec4aa673b055838f97f722c37f9c7323a6955c88f
parent55043ba37ee4b080a4f4f77b0ff672be3cbf8825
memory: introduce memory_region_find()

Given an address space (represented by the top-level memory region),
returns the memory region that maps a given range.  Useful for implementing
DMA.

The implementation is a simplistic binary search.  Once we have a tree
representation this can be optimized.

Signed-off-by: Avi Kivity <avi@redhat.com>
memory.c
memory.h