>> 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 -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
