From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GvmvK-0007ay-CX for qemu-devel@nongnu.org; Sat, 16 Dec 2006 22:42:50 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GvmvI-0007Yf-LU for qemu-devel@nongnu.org; Sat, 16 Dec 2006 22:42:49 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GvmvI-0007YS-FD for qemu-devel@nongnu.org; Sat, 16 Dec 2006 22:42:48 -0500 Received: from [64.233.182.185] (helo=nf-out-0910.google.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GvmvI-0002jk-FF for qemu-devel@nongnu.org; Sat, 16 Dec 2006 22:42:48 -0500 Received: by nf-out-0910.google.com with SMTP id c31so2397637nfb for ; Sat, 16 Dec 2006 19:42:47 -0800 (PST) Message-ID: <891be9410612161942t28116f7w12123ebca0ca6278@mail.gmail.com> Date: Sat, 16 Dec 2006 19:42:46 -0800 From: "Diwaker Gupta" MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: [Qemu-devel] Tracing guest memory accesses Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Hi list, I've searched the archives and the forums, but couldn't get a specific solution (I think my search terms might have been too general). Anyways, I think what I'm trying to do should be relatively easy and hopefully experts here will be able to quickly point me in the right direction :) So I'm just trying to trace all the memory accesses (virtual addresses) by the guest. I need to trace both reads and writes. If I can get the exact address, thats great. Otherwise I'm happy with simply logging the relevant page. I've uncommented DEBUG_IOMMU in hw/iommu.c and I've added some debug statements to the io_read and io_write calls in softmmu_template.h. At this point I have two questions: o do these changes seem correct? As in, do they actually track the read/write memory accesses done by the guest? I was concerned because when I start a guest, I see a whole lot of writes and not as many reads, which seems a little counter intuitive. o are these changes complete? As in, are there other entry/exit points in the code for memory accesses that I'm missing. Thanks, Diwaker -- Web/Blog/Gallery: http://floatingsun.net/blog