On 22 March 2016 at 14:02, Lluís Vilanova <vilan...@ac.upc.edu> wrote: > Stefan Hajnoczi writes: > >> On Wed, Mar 16, 2016 at 03:10:01PM +0000, Peter Maydell wrote: >>> The first two patches which add TCG guest data access tracing look >>> OK to me, but I'm much less sure about the last three which are >>> adding tracing into linux-user syscall emulation. I'm not sure >>> that lock_user is the right place to put that tracepoint. > >> Any thoughts on this, Lluís? > > Mmmm, I was struggling to find a place to easily add the tracing events > whenever the syscall emulation code accesses guest memory. > > The lock_user function is used precisely for that, but it can be a bit > heavy-handed as to what memory is actually read/written, since it only marks > the > "potential" ability of doing so (it's a sort of acquire/release interface that > differentiates between read and write acquires).
Well, that's why I'm not certain about it. I would prefer us to not trace the accesses rather than put a trace in a wrong position. thanks -- PMM