Skip to content

Commit

Permalink
xen/gntdev: stop using "token" argument
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
  • Loading branch information
Jeremy Fitzhardinge authored and Konrad Rzeszutek Wilk committed Jan 11, 2011
1 parent 9329e76 commit ba5d101
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/xen/gntdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit ba5d101

Please sign in to comment.