WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] Re: [PATCH 06/11] xen: gntdev: move use of GNTMAP_contains_p

To: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Subject: [Xen-devel] Re: [PATCH 06/11] xen: gntdev: move use of GNTMAP_contains_pte next to the map_op
From: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Date: Mon, 10 Jan 2011 10:32:51 +0000
Cc: "Derek G. Murray" <Derek.Murray@xxxxxxxxxxxx>, Jeremy Fitzhardinge <jeremy@xxxxxxxx>, Fitzhardinge <Jeremy.Fitzhardinge@xxxxxxxxxx>, Jeremy, Stefano Stabellini <Stefano.Stabellini@xxxxxxxxxxxxx>, "linux-kernel@xxxxxxxxxxxxxxx" <linux-kernel@xxxxxxxxxxxxxxx>, Ian Campbell <Ian.Campbell@xxxxxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Gerd Hoffmann <kraxel@xxxxxxxxxx>
Delivery-date: Mon, 10 Jan 2011 02:35:07 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20110105202425.GD29993@xxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <alpine.DEB.2.00.1012151259510.2390@kaball-desktop> <1292420446-3348-6-git-send-email-stefano.stabellini@xxxxxxxxxxxxx> <20110105202425.GD29993@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Alpine 2.00 (DEB 1167 2008-08-23)
On Wed, 5 Jan 2011, Konrad Rzeszutek Wilk wrote:
> On Wed, Dec 15, 2010 at 01:40:41PM +0000, stefano.stabellini@xxxxxxxxxxxxx 
> wrote:
> > From: Ian Campbell <ian.campbell@xxxxxxxxxx>
> > 
> > This flag controls the meaning of gnttab_map_grant_ref.host_addr and
> > specifies that the field contains a refernce to the pte entry to be
>                                       ^^^^^^^^ - reference

fixed it

> > diff --git a/drivers/xen/gntdev.c b/drivers/xen/gntdev.c
> > index cf61c7d..b916d6b 100644
> > --- a/drivers/xen/gntdev.c
> > +++ b/drivers/xen/gntdev.c
> > @@ -205,10 +205,12 @@ static int find_grant_ptes(pte_t *pte, pgtable_t 
> > token, unsigned long addr, void
> >     BUG_ON(pgnr >= map->count);
> >     pte_maddr  = (u64)pfn_to_mfn(page_to_pfn(token)) << PAGE_SHIFT;
> >     pte_maddr += (unsigned long)pte & ~PAGE_MASK;
> > -   gnttab_set_map_op(&map->map_ops[pgnr], pte_maddr, map->flags,
> > +   gnttab_set_map_op(&map->map_ops[pgnr], pte_maddr,
> > +                     GNTMAP_contains_pte | map->flags,
> 
> Ok, but the gnttab_set_map_op will do the exact thing it did before. It still 
> does this:
> 
> map->host_addr = addr;
> 
> irregardless if you pass in any flag.
> 

Yes, but the flags are set in map_ops and that is critical because it
changes the meanings of the hypercall arguments.
 

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>