lkml.org 
[lkml]   [2011]   [Jan]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 06/11] xen: gntdev: move use of GNTMAP_contains_pte next to the map_op
    On Wed, 5 Jan 2011, Konrad Rzeszutek Wilk wrote:
    > On Wed, Dec 15, 2010 at 01:40:41PM +0000, stefano.stabellini@eu.citrix.com wrote:
    > > From: Ian Campbell <ian.campbell@citrix.com>
    > >
    > > 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.



    \
     
     \ /
      Last update: 2011-01-10 11:33    [W:0.072 / U:59.308 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site