[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] Capture SIGSEGV to track pc.ram page access
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] Capture SIGSEGV to track pc.ram page access |
Date: |
Fri, 27 Sep 2013 12:50:32 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
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