lkml.org 
[lkml]   [2011]   [Jan]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 07/12] xen/gntdev: stop using "token" argument
    Date
    From: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>

    It's the struct page of the L1 pte page. But we can get its mfn
    by simply doing an arbitrary_virt_to_machine() on it anyway (which is
    the safe conservative choice; since we no longer allow HIGHPTE pages,
    we would never expect to be operating on a mapped pte page).

    Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
    ---
    drivers/xen/gntdev.c | 4 ++--
    1 files changed, 2 insertions(+), 2 deletions(-)

    diff --git a/drivers/xen/gntdev.c b/drivers/xen/gntdev.c
    index 888d763..a2ea533 100644
    --- a/drivers/xen/gntdev.c
    +++ b/drivers/xen/gntdev.c
    @@ -209,8 +209,8 @@ static int find_grant_ptes(pte_t *pte, pgtable_t token,
    u64 pte_maddr;

    BUG_ON(pgnr >= map->count);
    - pte_maddr = (u64)pfn_to_mfn(page_to_pfn(token)) << PAGE_SHIFT;
    - pte_maddr += (unsigned long)pte & ~PAGE_MASK;
    + pte_maddr = arbitrary_virt_to_machine(pte).maddr;
    +
    gnttab_set_map_op(&map->map_ops[pgnr], pte_maddr,
    GNTMAP_contains_pte | map->flags,
    map->grants[pgnr].ref,
    --
    1.5.6.5


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