Hi I have worked on PTLsim for nearly a year, and now I am starting to trace the code of MARSSx86 recently. I am wondering how the trace used for translation in fetch stage been transfered from QEMU to PTLsim. In my understanding, the *BasicBlockCache::translate* calls * TraceDecoder::fillbuf* to fill the *insnbuf, *and the *TraceDecoder::fillbuf * will call *ctx.copy_from_user* to get the x86 instruction of this basic block. * *
The first question is what is the purpose of* *calculating the physical address in *ctx.copy_from_user?* It seems that the *ctx.copy_from_user *does not make use of the physical address to get the x86 instruction of the basic block.* * The *ctx.copy_from_user *directly copy the data with the virtual address rip by calling *ldub_code* or *ldub_kernel.* Does *ldub_code* or *ldub_kernel *can only be used under user mode of MARSSx86? (The comment of *ldub_code* or *ldub_kernel* says " if user mode, no other memory access functions") Any help would be grateful! Thanks! Teng-Feng
_______________________________________________ http://www.marss86.org Marss86-Devel mailing list [email protected] https://www.cs.binghamton.edu/mailman/listinfo/marss86-devel
