Lines Matching refs:vmaddr

362  * @vmaddr: address in the host process address space
366 static int __gmap_unlink_by_vmaddr(struct gmap *gmap, unsigned long vmaddr)
373 entry = radix_tree_delete(&gmap->host_to_guest, vmaddr >> PMD_SHIFT);
391 unsigned long vmaddr;
393 vmaddr = (unsigned long) radix_tree_delete(&gmap->guest_to_host,
395 return vmaddr ? __gmap_unlink_by_vmaddr(gmap, vmaddr) : 0;
486 unsigned long vmaddr;
488 vmaddr = (unsigned long)
491 return vmaddr ? (vmaddr | (gaddr & ~PMD_MASK)) : -EFAULT;
519 * @vmaddr: vm address associated with the host page table
522 unsigned long vmaddr)
529 flush = __gmap_unlink_by_vmaddr(gmap, vmaddr);
543 * @vmaddr: vm address
550 int __gmap_link(struct gmap *gmap, unsigned long gaddr, unsigned long vmaddr)
592 pgd = pgd_offset(mm, vmaddr);
594 p4d = p4d_offset(pgd, vmaddr);
596 pud = pud_offset(p4d, vmaddr);
601 pmd = pmd_offset(pud, vmaddr);
614 vmaddr >> PMD_SHIFT, table);
649 unsigned long vmaddr;
657 vmaddr = __gmap_translate(gmap, gaddr);
658 if (IS_ERR_VALUE(vmaddr)) {
659 rc = vmaddr;
662 if (fixup_user_fault(gmap->mm, vmaddr, fault_flags,
674 rc = __gmap_link(gmap, gaddr, vmaddr);
687 unsigned long vmaddr;
692 vmaddr = (unsigned long) radix_tree_lookup(&gmap->guest_to_host,
694 if (vmaddr) {
695 vmaddr |= gaddr & ~PMD_MASK;
697 vma = vma_lookup(gmap->mm, vmaddr);
702 ptep = get_locked_pte(gmap->mm, vmaddr, &ptl);
704 ptep_zap_unused(gmap->mm, vmaddr, ptep, 0);
713 unsigned long gaddr, vmaddr, size;
720 vmaddr = (unsigned long)
723 if (!vmaddr)
725 vmaddr |= gaddr & ~PMD_MASK;
727 vma = find_vma(gmap->mm, vmaddr);
737 zap_page_range_single(vma, vmaddr, size, NULL);
883 * @vmaddr: address in the host process address space
891 unsigned long vmaddr, int prot)
899 if (fixup_user_fault(mm, vmaddr, fault_flags, &unlocked))
905 return __gmap_link(gmap, gaddr, vmaddr);
1060 unsigned long vmaddr, dist;
1092 vmaddr = __gmap_translate(gmap, gaddr);
1093 if (IS_ERR_VALUE(vmaddr))
1094 return vmaddr;
1095 rc = gmap_pte_op_fixup(gmap, gaddr, vmaddr, prot);
1148 unsigned long address, vmaddr;
1173 vmaddr = __gmap_translate(gmap, gaddr);
1174 if (IS_ERR_VALUE(vmaddr)) {
1175 rc = vmaddr;
1178 rc = gmap_pte_op_fixup(gmap, gaddr, vmaddr, PROT_READ);
1189 * @vmaddr: vm address associated with the rmap
1194 static inline void gmap_insert_rmap(struct gmap *sg, unsigned long vmaddr,
1201 slot = radix_tree_lookup_slot(&sg->host_to_rmap, vmaddr >> PAGE_SHIFT);
1214 radix_tree_insert(&sg->host_to_rmap, vmaddr >> PAGE_SHIFT,
1234 unsigned long vmaddr;
1242 vmaddr = __gmap_translate(parent, paddr);
1243 if (IS_ERR_VALUE(vmaddr))
1244 return vmaddr;
1261 gmap_insert_rmap(sg, vmaddr, rmap);
1268 rc = gmap_pte_op_fixup(parent, paddr, vmaddr, PROT_READ);
2139 unsigned long vmaddr, paddr;
2156 vmaddr = __gmap_translate(parent, paddr);
2157 if (IS_ERR_VALUE(vmaddr)) {
2158 rc = vmaddr;
2179 gmap_insert_rmap(sg, vmaddr, rmap);
2189 rc = gmap_pte_op_fixup(parent, paddr, vmaddr, prot);
2203 static void gmap_shadow_notify(struct gmap *sg, unsigned long vmaddr,
2229 head = radix_tree_delete(&sg->host_to_rmap, vmaddr >> PAGE_SHIFT);
2258 * @vmaddr: virtual address in the process address space
2265 void ptep_notify(struct mm_struct *mm, unsigned long vmaddr,
2278 vmaddr >> PMD_SHIFT);
2289 gmap_shadow_notify(sg, vmaddr, gaddr);
2332 static void gmap_pmdp_clear(struct mm_struct *mm, unsigned long vmaddr,
2343 vmaddr >> PMD_SHIFT);
2362 * @vmaddr: virtual address in the process address space
2364 void gmap_pmdp_invalidate(struct mm_struct *mm, unsigned long vmaddr)
2366 gmap_pmdp_clear(mm, vmaddr, 0);
2373 * @vmaddr: virtual address in the process address space
2375 void gmap_pmdp_csp(struct mm_struct *mm, unsigned long vmaddr)
2377 gmap_pmdp_clear(mm, vmaddr, 1);
2384 * @vmaddr: virtual address in the process address space
2386 void gmap_pmdp_idte_local(struct mm_struct *mm, unsigned long vmaddr)
2396 vmaddr >> PMD_SHIFT);
2419 * @vmaddr: virtual address in the process address space
2421 void gmap_pmdp_idte_global(struct mm_struct *mm, unsigned long vmaddr)
2431 vmaddr >> PMD_SHIFT);
2484 * @vmaddr: virtual address in the host address space
2490 unsigned long gaddr, unsigned long vmaddr)
2505 for (i = 0; i < _PAGE_ENTRIES; i++, vmaddr += PAGE_SIZE) {
2506 ptep = pte_alloc_map_lock(gmap->mm, pmdp, vmaddr, &ptl);
2509 if (ptep_test_and_clear_uc(gmap->mm, vmaddr, ptep))