From: Arn <cse.syslab@gmail.com>
To: "Muli Ben-Yehuda" <muli@il.ibm.com>, izik@qumranet.com
Cc: kvm@vger.kernel.org
Subject: Re: What happens if I use get_user_pages()
Date: Tue, 8 Jul 2008 17:04:08 -0400 [thread overview]
Message-ID: <896ae46a0807081404p32cf4e22wc9aaab6f111b42a@mail.gmail.com> (raw)
In-Reply-To: <20080708194120.GB8478@il.ibm.com>
>> If I use the kernel function "get_user_pages()" within a guest
>> kernel module, will this ensure that the guests pages are never
>> swapped out by the host ? Will it lock these pages in memory ?
>> (Has anyone tried this ? )
>
> As Izik said, the answer is no. Is this the desirable outcome, or are
> you trying to find a way for the guest to force the host to pin pages
> in memory? If so, why?
>
Izik, Muli, thanks,
Actually I don't want the guests pages to be pinned at all. My aim is
to do a timing check from within guest (guest kernel) to see if we can
detect that the host has swapped out any of the guests pages. Without
the guest knowing. Its proving to be more difficult than I had
thought. Probably due to my lack of experience with kvm/linux
internals.
My idea is to get the guest kernel to read byte from each of its pages
(either all or a random set of pages) and do a timing check at each
read. A read from a page that has been swapped out by host should take
much longer than a read done directly from memory.
>From previous emails on this list it seems that if I map a guest's
page into its kernelspace then that page will never be swapped out
(due to shadow pagetables). So now I'm stuck, any advice will be
appreciated.
thanks
Arn
next prev parent reply other threads:[~2008-07-08 21:04 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-08 6:46 What happens if I use get_user_pages() Arn
2008-07-08 9:47 ` Izik Eidus
2008-07-08 19:41 ` Muli Ben-Yehuda
2008-07-08 21:04 ` Arn [this message]
2008-07-09 4:40 ` Izik Eidus
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=896ae46a0807081404p32cf4e22wc9aaab6f111b42a@mail.gmail.com \
--to=cse.syslab@gmail.com \
--cc=izik@qumranet.com \
--cc=kvm@vger.kernel.org \
--cc=muli@il.ibm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox