Lines Matching full:region
19 static int modify_region(struct acrn_vm *vm, struct vm_memory_region_op *region) in modify_region() argument
30 regions->regions_gpa = virt_to_phys(region); in modify_region()
35 "Failed to set memory region for VM[%u]!\n", vm->vmid); in modify_region()
42 * acrn_mm_region_add() - Set up the EPT mapping of a memory region.
46 * @size: Size of the region.
55 struct vm_memory_region_op *region; in acrn_mm_region_add() local
58 region = kzalloc(sizeof(*region), GFP_KERNEL); in acrn_mm_region_add()
59 if (!region) in acrn_mm_region_add()
62 region->type = ACRN_MEM_REGION_ADD; in acrn_mm_region_add()
63 region->user_vm_pa = user_gpa; in acrn_mm_region_add()
64 region->service_vm_pa = service_gpa; in acrn_mm_region_add()
65 region->size = size; in acrn_mm_region_add()
66 region->attr = ((mem_type & ACRN_MEM_TYPE_MASK) | in acrn_mm_region_add()
68 ret = modify_region(vm, region); in acrn_mm_region_add()
73 kfree(region); in acrn_mm_region_add()
78 * acrn_mm_region_del() - Del the EPT mapping of a memory region.
81 * @size: Size of the region.
87 struct vm_memory_region_op *region; in acrn_mm_region_del() local
90 region = kzalloc(sizeof(*region), GFP_KERNEL); in acrn_mm_region_del()
91 if (!region) in acrn_mm_region_del()
94 region->type = ACRN_MEM_REGION_DEL; in acrn_mm_region_del()
95 region->user_vm_pa = user_gpa; in acrn_mm_region_del()
96 region->service_vm_pa = 0UL; in acrn_mm_region_del()
97 region->size = size; in acrn_mm_region_del()
98 region->attr = 0U; in acrn_mm_region_del()
100 ret = modify_region(vm, region); in acrn_mm_region_del()
104 kfree(region); in acrn_mm_region_del()
126 "Add memory region failed, VM[%u]!\n", vm->vmid); in acrn_vm_memseg_map()
144 "Del memory region failed, VM[%u]!\n", vm->vmid); in acrn_vm_memseg_unmap()
171 /* Get the page number of the map region */ in acrn_vm_ram_map()
241 /* Lock the pages of user memory map region */ in acrn_vm_ram_map()
253 /* Create a kernel map for the map region */ in acrn_vm_ram_map()