From: Mads Bergdal <mbergdal@gmail.com>
To: xen-devel@lists.xensource.com
Subject: Re: How to intercept interrupts from guest domains
Date: Thu, 21 Sep 2006 13:46:19 +0200 [thread overview]
Message-ID: <eetu2n$6an$1@sea.gmane.org> (raw)
In-Reply-To: <C1357E8B.1615%Keir.Fraser@cl.cam.ac.uk>
Keir Fraser wrote:
> On 19/9/06 10:52, "Mads Bergdal" <mbergdal@gmail.com> wrote:
>
>>>> I am writing my master thesis on virtualization with Xen. I am trying to
>>>> intercept the hypercalls coming from the guest domains. More
>>>> specific I am trying to determine where in memory a guest domain is
>>>> writing. Does anyone have a hint on where in the code I should try to do
>>>> this?
>>> If you want to know where a guest is writing you need to do more than
>>> intercept hypercalls. You want to intercept memory accesses to, which would
>>> liekly mean you need to run on shadow pagetables and manipulate access
>>> permissions to trap on first access to a page.
>>>
>>> -- Keir
>> Yes, that sounds reasonable. Do you know where in the code this could be
>> achieved?
>
> What's the intended purpose? You could perhaps look at the log-dirty shadow
> mode. This is used to track which pages have been modified by the guest -- a
> page which the guest maps writeable is not made writable in the shadow page
> tables until the time of the first write access (when that page is added to
> a 'dirty log' for further processing).
>
> Be warned that modifying the shadow code is rather more difficult than a
> project that would simply involve adding a hook point to every hypercall!
>
> -- Keir
Thanks for the hints. I really appreciate it.
My main purpose of this is to try to monitor when a guestdomain tries to
write to a specific address in it's memory. (An address that it should
not write to) And then get the Hypervisor to notify my userspace
"surveillance" program about this.
I have spent quite some time now reading the code. I must admit I am a
bit lost. I am not sure where in the code I should be looking to get
started.
From what you write above I take it that you think the easiest approach
is to hook into the hypercalls? I that case which hypercalls and where?
If not, where should I look to learn he internals of the shadow mode?
Hope I am not wasting your time...
Mads
next prev parent reply other threads:[~2006-09-21 11:46 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-19 9:14 How to intercept interrupts from guest domains Mads Bergdal
2006-09-19 9:49 ` Keir Fraser
2006-09-19 9:52 ` Mads Bergdal
2006-09-19 10:01 ` Keir Fraser
2006-09-21 11:46 ` Mads Bergdal [this message]
2006-09-21 12:16 ` Petersson, Mats
2006-09-21 13:12 ` Mads Bergdal
2006-09-21 14:31 ` Petersson, Mats
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='eetu2n$6an$1@sea.gmane.org' \
--to=mbergdal@gmail.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.