From: Izik Eidus <izik@qumranet.com>
To: Arn <cse.syslab@gmail.com>
Cc: Muli Ben-Yehuda <muli@il.ibm.com>, kvm@vger.kernel.org
Subject: Re: What happens if I use get_user_pages()
Date: Tue, 08 Jul 2008 23:40:16 -0500 [thread overview]
Message-ID: <48744130.4000903@qumranet.com> (raw)
In-Reply-To: <896ae46a0807081404p32cf4e22wc9aaab6f111b42a@mail.gmail.com>
ציטוט Arn:
>>> 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.
>
pages that will be inside the shadow page tables wont be swappable, you
have to use mmu notifiers patch in order to have reible swapping.
> thanks
> Arn
>
prev parent reply other threads:[~2008-07-09 4:40 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
2008-07-09 4:40 ` Izik Eidus [this message]
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=48744130.4000903@qumranet.com \
--to=izik@qumranet.com \
--cc=cse.syslab@gmail.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