Add target memory mapping API (Avi Kivity)
commit6d16c2f88f2a866bec27c4d170ddd97ee8e41a0e
authoraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>
Thu, 22 Jan 2009 16:59:11 +0000 (22 16:59 +0000)
committeraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>
Thu, 22 Jan 2009 16:59:11 +0000 (22 16:59 +0000)
tree77f31b52168f1a8c7042be16b2a2b9821e525e97
parentd268de04f29f8f6ad4523958e55fc5b55395eabc
Add target memory mapping API (Avi Kivity)

Devices accessing large amounts of memory (as with DMA) will wish to obtain
a pointer to guest memory rather than access it indirectly via
cpu_physical_memory_rw().  Add a new API to convert target addresses to
host pointers.

In case the target address does not correspond to RAM, a bounce buffer is
allocated.  To prevent the guest from causing the host to allocate unbounded
amounts of bounce buffer, this memory is limited (currently to one page).

Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6394 c046a42c-6fe2-441c-8c8c-71466251a162
cpu-all.h
exec.c