diff options
Diffstat (limited to 'drivers/xen/gntdev.c')
-rw-r--r-- | drivers/xen/gntdev.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/xen/gntdev.c b/drivers/xen/gntdev.c index fa6355a97081..888d76307d59 100644 --- a/drivers/xen/gntdev.c +++ b/drivers/xen/gntdev.c | |||
@@ -211,10 +211,12 @@ static int find_grant_ptes(pte_t *pte, pgtable_t token, | |||
211 | BUG_ON(pgnr >= map->count); | 211 | BUG_ON(pgnr >= map->count); |
212 | pte_maddr = (u64)pfn_to_mfn(page_to_pfn(token)) << PAGE_SHIFT; | 212 | pte_maddr = (u64)pfn_to_mfn(page_to_pfn(token)) << PAGE_SHIFT; |
213 | pte_maddr += (unsigned long)pte & ~PAGE_MASK; | 213 | pte_maddr += (unsigned long)pte & ~PAGE_MASK; |
214 | gnttab_set_map_op(&map->map_ops[pgnr], pte_maddr, map->flags, | 214 | gnttab_set_map_op(&map->map_ops[pgnr], pte_maddr, |
215 | GNTMAP_contains_pte | map->flags, | ||
215 | map->grants[pgnr].ref, | 216 | map->grants[pgnr].ref, |
216 | map->grants[pgnr].domid); | 217 | map->grants[pgnr].domid); |
217 | gnttab_set_unmap_op(&map->unmap_ops[pgnr], pte_maddr, map->flags, | 218 | gnttab_set_unmap_op(&map->unmap_ops[pgnr], pte_maddr, |
219 | GNTMAP_contains_pte | map->flags, | ||
218 | 0 /* handle */); | 220 | 0 /* handle */); |
219 | return 0; | 221 | return 0; |
220 | } | 222 | } |
@@ -569,7 +571,7 @@ static int gntdev_mmap(struct file *flip, struct vm_area_struct *vma) | |||
569 | vma->vm_private_data = map; | 571 | vma->vm_private_data = map; |
570 | map->vma = vma; | 572 | map->vma = vma; |
571 | 573 | ||
572 | map->flags = GNTMAP_host_map | GNTMAP_application_map | GNTMAP_contains_pte; | 574 | map->flags = GNTMAP_host_map | GNTMAP_application_map; |
573 | if (!(vma->vm_flags & VM_WRITE)) | 575 | if (!(vma->vm_flags & VM_WRITE)) |
574 | map->flags |= GNTMAP_readonly; | 576 | map->flags |= GNTMAP_readonly; |
575 | 577 | ||