Lines Matching refs:vmaddr

352  * @vmaddr: address in the host process address space
356 static int __gmap_unlink_by_vmaddr(struct gmap *gmap, unsigned long vmaddr)
363 entry = radix_tree_delete(&gmap->host_to_guest, vmaddr >> PMD_SHIFT);
381 unsigned long vmaddr;
383 vmaddr = (unsigned long) radix_tree_delete(&gmap->guest_to_host,
385 return vmaddr ? __gmap_unlink_by_vmaddr(gmap, vmaddr) : 0;
476 unsigned long vmaddr;
478 vmaddr = (unsigned long)
481 return vmaddr ? (vmaddr | (gaddr & ~PMD_MASK)) : -EFAULT;
509 * @vmaddr: vm address associated with the host page table
512 unsigned long vmaddr)
519 flush = __gmap_unlink_by_vmaddr(gmap, vmaddr);
533 * @vmaddr: vm address
540 int __gmap_link(struct gmap *gmap, unsigned long gaddr, unsigned long vmaddr)
582 pgd = pgd_offset(mm, vmaddr);
584 p4d = p4d_offset(pgd, vmaddr);
586 pud = pud_offset(p4d, vmaddr);
591 pmd = pmd_offset(pud, vmaddr);
604 vmaddr >> PMD_SHIFT, table);
639 unsigned long vmaddr;
647 vmaddr = __gmap_translate(gmap, gaddr);
648 if (IS_ERR_VALUE(vmaddr)) {
649 rc = vmaddr;
652 if (fixup_user_fault(gmap->mm, vmaddr, fault_flags,
664 rc = __gmap_link(gmap, gaddr, vmaddr);
676 unsigned long vmaddr;
681 vmaddr = (unsigned long) radix_tree_lookup(&gmap->guest_to_host,
683 if (vmaddr) {
684 vmaddr |= gaddr & ~PMD_MASK;
686 ptep = get_locked_pte(gmap->mm, vmaddr, &ptl);
688 ptep_zap_unused(gmap->mm, vmaddr, ptep, 0);
697 unsigned long gaddr, vmaddr, size;
704 vmaddr = (unsigned long)
707 if (!vmaddr)
709 vmaddr |= gaddr & ~PMD_MASK;
711 vma = find_vma(gmap->mm, vmaddr);
721 zap_page_range(vma, vmaddr, size);
867 * @vmaddr: address in the host process address space
875 unsigned long vmaddr, int prot)
883 if (fixup_user_fault(mm, vmaddr, fault_flags, &unlocked))
889 return __gmap_link(gmap, gaddr, vmaddr);
1044 unsigned long vmaddr, dist;
1076 vmaddr = __gmap_translate(gmap, gaddr);
1077 if (IS_ERR_VALUE(vmaddr))
1078 return vmaddr;
1079 rc = gmap_pte_op_fixup(gmap, gaddr, vmaddr, prot);
1132 unsigned long address, vmaddr;
1157 vmaddr = __gmap_translate(gmap, gaddr);
1158 if (IS_ERR_VALUE(vmaddr)) {
1159 rc = vmaddr;
1162 rc = gmap_pte_op_fixup(gmap, gaddr, vmaddr, PROT_READ);
1173 * @vmaddr: vm address associated with the rmap
1178 static inline void gmap_insert_rmap(struct gmap *sg, unsigned long vmaddr,
1184 slot = radix_tree_lookup_slot(&sg->host_to_rmap, vmaddr >> PAGE_SHIFT);
1191 radix_tree_insert(&sg->host_to_rmap, vmaddr >> PAGE_SHIFT,
1211 unsigned long vmaddr;
1219 vmaddr = __gmap_translate(parent, paddr);
1220 if (IS_ERR_VALUE(vmaddr))
1221 return vmaddr;
1238 gmap_insert_rmap(sg, vmaddr, rmap);
1245 rc = gmap_pte_op_fixup(parent, paddr, vmaddr, PROT_READ);
2110 unsigned long vmaddr, paddr;
2127 vmaddr = __gmap_translate(parent, paddr);
2128 if (IS_ERR_VALUE(vmaddr)) {
2129 rc = vmaddr;
2150 gmap_insert_rmap(sg, vmaddr, rmap);
2160 rc = gmap_pte_op_fixup(parent, paddr, vmaddr, prot);
2174 static void gmap_shadow_notify(struct gmap *sg, unsigned long vmaddr,
2200 head = radix_tree_delete(&sg->host_to_rmap, vmaddr >> PAGE_SHIFT);
2236 void ptep_notify(struct mm_struct *mm, unsigned long vmaddr,
2249 vmaddr >> PMD_SHIFT);
2260 gmap_shadow_notify(sg, vmaddr, gaddr);
2303 static void gmap_pmdp_clear(struct mm_struct *mm, unsigned long vmaddr,
2314 vmaddr >> PMD_SHIFT);
2333 * @vmaddr: virtual address in the process address space
2335 void gmap_pmdp_invalidate(struct mm_struct *mm, unsigned long vmaddr)
2337 gmap_pmdp_clear(mm, vmaddr, 0);
2344 * @vmaddr: virtual address in the process address space
2346 void gmap_pmdp_csp(struct mm_struct *mm, unsigned long vmaddr)
2348 gmap_pmdp_clear(mm, vmaddr, 1);
2355 * @vmaddr: virtual address in the process address space
2357 void gmap_pmdp_idte_local(struct mm_struct *mm, unsigned long vmaddr)
2367 vmaddr >> PMD_SHIFT);
2390 * @vmaddr: virtual address in the process address space
2392 void gmap_pmdp_idte_global(struct mm_struct *mm, unsigned long vmaddr)
2402 vmaddr >> PMD_SHIFT);
2455 * @vmaddr: virtual address in the host address space
2461 unsigned long gaddr, unsigned long vmaddr)
2476 for (i = 0; i < _PAGE_ENTRIES; i++, vmaddr += PAGE_SIZE) {
2477 ptep = pte_alloc_map_lock(gmap->mm, pmdp, vmaddr, &ptl);
2480 if (ptep_test_and_clear_uc(gmap->mm, vmaddr, ptep))