Lines Matching refs:memmap
107 int acrn_vm_memseg_map(struct acrn_vm *vm, struct acrn_vm_memmap *memmap) in acrn_vm_memseg_map() argument
111 if (memmap->type == ACRN_MEMMAP_RAM) in acrn_vm_memseg_map()
112 return acrn_vm_ram_map(vm, memmap); in acrn_vm_memseg_map()
114 if (memmap->type != ACRN_MEMMAP_MMIO) { in acrn_vm_memseg_map()
116 "Invalid memmap type: %u\n", memmap->type); in acrn_vm_memseg_map()
120 ret = acrn_mm_region_add(vm, memmap->user_vm_pa, in acrn_vm_memseg_map()
121 memmap->service_vm_pa, memmap->len, in acrn_vm_memseg_map()
122 ACRN_MEM_TYPE_UC, memmap->attr); in acrn_vm_memseg_map()
130 int acrn_vm_memseg_unmap(struct acrn_vm *vm, struct acrn_vm_memmap *memmap) in acrn_vm_memseg_unmap() argument
134 if (memmap->type != ACRN_MEMMAP_MMIO) { in acrn_vm_memseg_unmap()
136 "Invalid memmap type: %u\n", memmap->type); in acrn_vm_memseg_unmap()
140 ret = acrn_mm_region_del(vm, memmap->user_vm_pa, memmap->len); in acrn_vm_memseg_unmap()
155 int acrn_vm_ram_map(struct acrn_vm *vm, struct acrn_vm_memmap *memmap) in acrn_vm_ram_map() argument
166 if (!vm || !memmap) in acrn_vm_ram_map()
170 nr_pages = memmap->len >> PAGE_SHIFT; in acrn_vm_ram_map()
176 pinned = pin_user_pages_fast(memmap->vma_base, in acrn_vm_ram_map()
200 region_mapping->size = memmap->len; in acrn_vm_ram_map()
202 region_mapping->user_vm_pa = memmap->user_vm_pa; in acrn_vm_ram_map()
236 user_vm_pa = memmap->user_vm_pa; in acrn_vm_ram_map()
250 (memmap->attr & ACRN_MEM_ACCESS_RIGHT_MASK); in acrn_vm_ram_map()
269 remap_vaddr, (void *)memmap->user_vm_pa, memmap->len); in acrn_vm_ram_map()