On 24/04/2015 04:10, Wenjie Liu wrote: > The thing I am trying to achieve is to get the data and guest physical > address of every guest memory access, so I need to known which API can > be used to do the address transform.
The short answer is that is difficult, because most guest memory accesses do not call any C function. QEMU has a virtual TLB; if you have a TLB hit, the code generated by the JIT compiler does the conversion. A C function is called only if you have a TLB miss, or if the guest is accessing a device. These C functions are defined in softmmu_template.h. The header is included multiple from cputlb.c. Paolo