From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39525) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VPVdG-00067y-II for qemu-devel@nongnu.org; Fri, 27 Sep 2013 06:50:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VPVd6-00080f-9D for qemu-devel@nongnu.org; Fri, 27 Sep 2013 06:50:46 -0400 Received: from mail-wg0-x22e.google.com ([2a00:1450:400c:c00::22e]:47337) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VPVd5-0007z6-So for qemu-devel@nongnu.org; Fri, 27 Sep 2013 06:50:36 -0400 Received: by mail-wg0-f46.google.com with SMTP id k14so2442522wgh.1 for ; Fri, 27 Sep 2013 03:50:34 -0700 (PDT) Date: Fri, 27 Sep 2013 12:50:32 +0200 From: Stefan Hajnoczi Message-ID: <20130927105032.GF9972@stefanha-thinkpad.redhat.com> References: <20130902091617.GC947@stefanha-thinkpad.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] Capture SIGSEGV to track pc.ram page access List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Thomas Knauth Cc: qemu-devel@nongnu.org On Thu, Sep 26, 2013 at 02:53:54PM +0200, Thomas Knauth wrote: > As far as I understand the dirty logging infrastructure will only > record writes. I want to track reads as well. > > A better way to express what I would like to do is trace all guest > physical addresses that are accessed. Again, I am unsure whether qemu > supports this out-of-the box and where I would have to add/modify the > source to do so. If you want to continue with the original SIGSEGV handler approach, check signals masks for the vcpu threads. Make sure the signal actually gets delivered to a thread that has the signal unblocked and a signal handler installed. Regarding dirty logging, you could try modifying the KVM dirty logging code to also trap reads. Also take a look at /proc/PID/pagemap and documentation on accessing this page table info. It can be used for tracking dirty pages ("soft-dirty") but I'm not sure if it reports accessed pages. Stefan