linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: David Vrabel <david.vrabel@citrix.com>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH 1/2] mm: provide a find_special_page vma operation
Date: Thu, 22 Jan 2015 16:06:20 -0800	[thread overview]
Message-ID: <20150122160620.e5e3f98ad58020832d899352@linux-foundation.org> (raw)
In-Reply-To: <1421682443-20509-2-git-send-email-david.vrabel@citrix.com>

On Mon, 19 Jan 2015 15:47:22 +0000 David Vrabel <david.vrabel@citrix.com> wrote:

> The optional find_special_page VMA operation is used to lookup the
> pages backing a VMA.  This is useful in cases where the normal
> mechanisms for finding the page don't work.  This is only called if
> the PTE is special.
> 
> One use case is a Xen PV guest mapping foreign pages into userspace.
> 
> In a Xen PV guest, the PTEs contain MFNs so get_user_pages() (for
> example) must do an MFN to PFN (M2P) lookup before it can get the
> page.  For foreign pages (those owned by another guest) the M2P lookup
> returns the PFN as seen by the foreign guest (which would be
> completely the wrong page for the local guest).
> 
> This cannot be fixed up improving the M2P lookup since one MFN may be
> mapped onto two or more pages so getting the right page is impossible
> given just the MFN.

Acked-by: Andrew Morton <akpm@linux-foundation.org>

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2015-01-23  0:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-19 15:47 [PATCHv3 0/2] mm: infrastructure for correctly handling foreign pages on Xen David Vrabel
2015-01-19 15:47 ` [PATCH 1/2] mm: provide a find_special_page vma operation David Vrabel
2015-01-23  0:06   ` Andrew Morton [this message]
2015-01-19 15:47 ` [PATCH 2/2] mm: add 'foreign' alias for the 'pinned' page flag David Vrabel
2015-01-23  0:06   ` Andrew Morton

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=20150122160620.e5e3f98ad58020832d899352@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=david.vrabel@citrix.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    /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