From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Vrabel Subject: Re: [PATCH 12/12] xen/gntdev: provide a set of pages for each VMA Date: Fri, 9 Jan 2015 16:41:41 +0000 Message-ID: <54B004C5.8070208@citrix.com> References: <1420570657-8203-1-git-send-email-david.vrabel@citrix.com> <1420570657-8203-13-git-send-email-david.vrabel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Y9cd8-00020j-1C for xen-devel@lists.xenproject.org; Fri, 09 Jan 2015 16:41:46 +0000 In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Stefano Stabellini Cc: xen-devel@lists.xenproject.org, Boris Ostrovsky , Jenny Herbert List-Id: xen-devel@lists.xenproject.org On 09/01/15 16:05, Stefano Stabellini wrote: > On Fri, 9 Jan 2015, Stefano Stabellini wrote: >> On Tue, 6 Jan 2015, David Vrabel wrote: >>> From: Jenny Herbert >>> >>> For each VMA for grant maps, provide the correct array of pages so >>> get_user_pages() on foreign mappings works in PV guests. >>> >>> Signed-off-by: Jenny Herbert >>> Signed-off-by: David Vrabel >>> --- >>> drivers/xen/gntdev.c | 2 ++ >>> 1 file changed, 2 insertions(+) >>> >>> diff --git a/drivers/xen/gntdev.c b/drivers/xen/gntdev.c >>> index 5d73fe8..09e7863 100644 >>> --- a/drivers/xen/gntdev.c >>> +++ b/drivers/xen/gntdev.c >>> @@ -870,6 +870,8 @@ static int gntdev_mmap(struct file *flip, struct vm_area_struct *vma) >>> vma->vm_end - vma->vm_start, >>> set_grant_ptes_as_special, NULL); >>> } >>> + >>> + vma->pages = map->pages; >> >> Shouldn't this be done just for x86 PV guests rather than all the >> callers of gntdev_mmap? > > I guess that since on ARM and PVH the pte wouldn't be marked SPECIAL, it > wouldn't make a difference, but it would still be nice to be consistent. This is already PV only. David