bdpayne/libvmi — pull request #113 by mzguanglin (2013-10-15 19:29:18+00:00)
Title: Direct Guest Memory Access for Shm-snapshot

Introduce non-copy guest memory read for shm-snapshot, which has drastically reduced memory read latency.

I add two APIs in this PR:
size_t vmi_get_dgpma(vmi_instance_t vmi, addr_t paddr, void **buf_ptr, size_t count);
size_t vmi_get_dgvma(vmi_instance_t vmi, addr_t vaddr, pid_t pid, void **buf_ptr, size_t count);
Both of which are similar to vmi_read_pa() / vmi_read_va(), except the non-copy manners.

Principle:
Medial address mapping strategy to ensure continous address mappings so that direct access can be possible.

Performance benchmark:
at least 5.6x speedup with minimal one page block in terms of the reduction of guest memory access latency.