Home
last modified time | relevance | path

Searched refs:vm (Results 1 – 25 of 284) sorted by relevance

12345678910>>...12

/openbsd-src/sys/dev/pci/drm/i915/gt/
H A Dintel_ggtt.c58 struct drm_i915_private *i915 = ggtt->vm.i915; in ggtt_init_hw()
60 i915_address_space_init(&ggtt->vm, VM_CLASS_GGTT); in ggtt_init_hw()
62 ggtt->vm.is_ggtt = true; in ggtt_init_hw()
65 ggtt->vm.has_read_only = IS_VALLEYVIEW(i915); in ggtt_init_hw()
68 ggtt->vm.mm.color_adjust = i915_ggtt_color_adjust; in ggtt_init_hw()
75 ggtt->vm.cleanup(&ggtt->vm); in ggtt_init_hw()
91 /* array of vm pages that physload introduced. */ in ggtt_init_hw()
140 * @vm: The VM to suspend the mappings for in i915_ggtt_suspend_vm()
145 void i915_ggtt_suspend_vm(struct i915_address_space *vm) in i915_ggtt_suspend_vm()
139 i915_ggtt_suspend_vm(struct i915_address_space * vm) i915_ggtt_suspend_vm() argument
309 gen8_ggtt_insert_page(struct i915_address_space * vm,dma_addr_t addr,u64 offset,unsigned int pat_index,u32 flags) gen8_ggtt_insert_page() argument
324 gen8_ggtt_insert_entries(struct i915_address_space * vm,struct i915_vma_resource * vma_res,unsigned int pat_index,u32 flags) gen8_ggtt_insert_entries() argument
363 gen8_ggtt_clear_range(struct i915_address_space * vm,u64 start,u64 length) gen8_ggtt_clear_range() argument
384 gen6_ggtt_insert_page(struct i915_address_space * vm,dma_addr_t addr,u64 offset,unsigned int pat_index,u32 flags) gen6_ggtt_insert_page() argument
405 gen6_ggtt_insert_entries(struct i915_address_space * vm,struct i915_vma_resource * vma_res,unsigned int pat_index,u32 flags) gen6_ggtt_insert_entries() argument
438 nop_clear_range(struct i915_address_space * vm,u64 start,u64 length) nop_clear_range() argument
443 bxt_vtd_ggtt_wa(struct i915_address_space * vm) bxt_vtd_ggtt_wa() argument
456 struct i915_address_space *vm; global() member
473 bxt_vtd_ggtt_insert_page__BKL(struct i915_address_space * vm,dma_addr_t addr,u64 offset,unsigned int pat_index,u32 unused) bxt_vtd_ggtt_insert_page__BKL() argument
485 struct i915_address_space *vm; global() member
502 bxt_vtd_ggtt_insert_entries__BKL(struct i915_address_space * vm,struct i915_vma_resource * vma_res,unsigned int pat_index,u32 flags) bxt_vtd_ggtt_insert_entries__BKL() argument
512 gen6_ggtt_clear_range(struct i915_address_space * vm,u64 start,u64 length) gen6_ggtt_clear_range() argument
533 intel_ggtt_bind_vma(struct i915_address_space * vm,struct i915_vm_pt_stash * stash,struct i915_vma_resource * vma_res,unsigned int pat_index,u32 flags) intel_ggtt_bind_vma() argument
557 intel_ggtt_unbind_vma(struct i915_address_space * vm,struct i915_vma_resource * vma_res) intel_ggtt_unbind_vma() argument
710 aliasing_gtt_bind_vma(struct i915_address_space * vm,struct i915_vm_pt_stash * stash,struct i915_vma_resource * vma_res,unsigned int pat_index,u32 flags) aliasing_gtt_bind_vma() argument
733 aliasing_gtt_unbind_vma(struct i915_address_space * vm,struct i915_vma_resource * vma_res) aliasing_gtt_unbind_vma() argument
1059 gen6_gmch_remove(struct i915_address_space * vm) gen6_gmch_remove() argument
1442 i915_ggtt_resume_vm(struct i915_address_space * vm) i915_ggtt_resume_vm() argument
[all...]
H A Dintel_gtt.c41 struct drm_i915_gem_object *alloc_pt_lmem(struct i915_address_space *vm, int sz) in alloc_pt_lmem()
57 obj = __i915_gem_object_create_lmem_with_ps(vm->i915, sz, sz, in alloc_pt_lmem()
58 vm->lmem_pt_obj_flags); in alloc_pt_lmem()
60 * Ensure all paging structures for this vm share the same dma-resv in alloc_pt_lmem()
65 obj->base.resv = i915_vm_resv_get(vm);
66 obj->shares_resv_from = vm; in alloc_pt_dma() argument
72 struct drm_i915_gem_object *alloc_pt_dma(struct i915_address_space *vm, int sz) in alloc_pt_dma()
76 if (I915_SELFTEST_ONLY(should_fail(&vm->fault_attr, 1))) in alloc_pt_dma()
77 i915_gem_shrink_all(vm->i915); in alloc_pt_dma()
79 obj = i915_gem_object_create_internal(vm in alloc_pt_dma()
35 alloc_pt_lmem(struct i915_address_space * vm,int sz) alloc_pt_lmem() argument
87 map_pt_dma(struct i915_address_space * vm,struct drm_i915_gem_object * obj) map_pt_dma() argument
101 map_pt_dma_locked(struct i915_address_space * vm,struct drm_i915_gem_object * obj) map_pt_dma_locked() argument
151 __i915_vm_close(struct i915_address_space * vm) __i915_vm_close() argument
166 i915_vm_lock_objects(struct i915_address_space * vm,struct i915_gem_ww_ctx * ww) i915_vm_lock_objects() argument
179 i915_address_space_fini(struct i915_address_space * vm) i915_address_space_fini() argument
194 struct i915_address_space *vm = i915_vm_resv_release() local
205 struct i915_address_space *vm = __i915_vm_release() local
221 struct i915_address_space *vm = i915_vm_release() local
230 i915_address_space_init(struct i915_address_space * vm,int subclass) i915_address_space_init() argument
328 setup_scratch_page(struct i915_address_space * vm) setup_scratch_page() argument
392 free_scratch(struct i915_address_space * vm) free_scratch() argument
664 __vm_create_scratch_for_read(struct i915_address_space * vm,unsigned long size) __vm_create_scratch_for_read() argument
685 __vm_create_scratch_for_read_pinned(struct i915_address_space * vm,unsigned long size) __vm_create_scratch_for_read_pinned() argument
[all...]
H A Dintel_gtt.h64 #define ggtt_total_entries(ggtt) ((ggtt)->vm.total >> PAGE_SHIFT)
233 void (*bind_vma)(struct i915_address_space *vm,
242 void (*unbind_vma)(struct i915_address_space *vm,
296 /* Flags used when creating page-table objects for this vm */
303 (*alloc_pt_dma)(struct i915_address_space *vm, int sz);
305 (*alloc_scratch_dma)(struct i915_address_space *vm, int sz);
313 void (*allocate_va_range)(struct i915_address_space *vm,
316 void (*clear_range)(struct i915_address_space *vm,
318 void (*scratch_range)(struct i915_address_space *vm,
320 void (*insert_page)(struct i915_address_space *vm,
359 struct i915_address_space vm; global() member
404 struct i915_address_space vm; global() member
409 i915_is_ggtt(vm) global() argument
410 i915_is_dpt(vm) global() argument
411 i915_is_ggtt_or_dpt(vm) global() argument
419 i915_vm_is_4lvl(const struct i915_address_space * vm) i915_vm_is_4lvl() argument
425 i915_vm_has_scratch_64K(struct i915_address_space * vm) i915_vm_has_scratch_64K() argument
430 i915_vm_min_alignment(struct i915_address_space * vm,enum intel_memory_type type) i915_vm_min_alignment() argument
440 i915_vm_obj_min_alignment(struct i915_address_space * vm,struct drm_i915_gem_object * obj) i915_vm_obj_min_alignment() argument
450 i915_vm_has_cache_coloring(struct i915_address_space * vm) i915_vm_has_cache_coloring() argument
456 i915_vm_to_ggtt(struct i915_address_space * vm) i915_vm_to_ggtt() argument
464 i915_vm_to_ppgtt(struct i915_address_space * vm) i915_vm_to_ppgtt() argument
472 i915_vm_get(struct i915_address_space * vm) i915_vm_get() argument
479 i915_vm_tryget(struct i915_address_space * vm) i915_vm_tryget() argument
484 assert_vm_alive(struct i915_address_space * vm) assert_vm_alive() argument
495 i915_vm_resv_get(struct i915_address_space * vm) i915_vm_resv_get() argument
505 i915_vm_put(struct i915_address_space * vm) i915_vm_put() argument
514 i915_vm_resv_put(struct i915_address_space * vm) i915_vm_resv_put() argument
633 free_pt(vm,px) global() argument
634 free_pd(vm,px) global() argument
[all...]
H A Dgen8_ppgtt.c89 struct drm_i915_private *i915 = ppgtt->vm.i915; in gen8_ppgtt_notify_vgt()
90 struct intel_uncore *uncore = ppgtt->vm.gt->uncore; in gen8_ppgtt_notify_vgt()
101 if (i915_vm_is_4lvl(&ppgtt->vm)) { in gen8_ppgtt_notify_vgt()
179 static unsigned int gen8_pd_top_count(const struct i915_address_space *vm) in gen8_pd_top_count() argument
181 unsigned int shift = __gen8_pte_shift(vm->top); in gen8_pd_top_count()
183 return (vm->total + (1ull << shift) - 1) >> shift; in gen8_pd_top_count()
187 gen8_pdp_for_page_index(struct i915_address_space * const vm, const u64 idx) in gen8_pdp_for_page_index() argument
189 struct i915_ppgtt * const ppgtt = i915_vm_to_ppgtt(vm); in gen8_pdp_for_page_index()
191 if (vm->top == 2) in gen8_pdp_for_page_index()
194 return i915_pd_entry(ppgtt->pd, gen8_pd_index(idx, vm->top)); in gen8_pdp_for_page_index()
[all …]
H A Dgen6_ppgtt.c23 dma_addr_t addr = pt ? px_dma(pt) : px_dma(ppgtt->base.vm.scratch[1]); in gen6_write_pde()
74 static void gen6_ppgtt_clear_range(struct i915_address_space *vm, in gen6_ppgtt_clear_range() argument
77 struct gen6_ppgtt * const ppgtt = to_gen6_ppgtt(i915_vm_to_ppgtt(vm)); in gen6_ppgtt_clear_range()
79 const gen6_pte_t scratch_pte = vm->scratch[0]->encode; in gen6_ppgtt_clear_range()
110 static void gen6_ppgtt_insert_entries(struct i915_address_space *vm, in gen6_ppgtt_insert_entries() argument
115 struct i915_ppgtt *ppgtt = i915_vm_to_ppgtt(vm); in gen6_ppgtt_insert_entries()
120 const u32 pte_encode = vm->pte_encode(0, pat_index, flags); in gen6_ppgtt_insert_entries()
166 gen6_ggtt_invalidate(ppgtt->base.vm.gt->ggtt); in gen6_flush_pd()
172 static void gen6_alloc_va_range(struct i915_address_space *vm, in gen6_alloc_va_range() argument
176 struct gen6_ppgtt *ppgtt = to_gen6_ppgtt(i915_vm_to_ppgtt(vm)); in gen6_alloc_va_range()
[all …]
H A Dintel_ppgtt.c16 struct i915_page_table *alloc_pt(struct i915_address_space *vm, int sz) in alloc_pt() argument
24 pt->base = vm->alloc_pt_dma(vm, sz); in alloc_pt()
53 struct i915_page_directory *alloc_pd(struct i915_address_space *vm) in alloc_pd() argument
61 pd->pt.base = vm->alloc_pt_dma(vm, I915_GTT_PAGE_SIZE_4K); in alloc_pd()
71 void free_px(struct i915_address_space *vm, struct i915_page_table *pt, int lvl) in free_px() argument
177 trace_i915_ppgtt_create(&ppgtt->vm); in i915_ppgtt_create()
182 void ppgtt_bind_vma(struct i915_address_space *vm, in ppgtt_bind_vma() argument
191 vm->allocate_va_range(vm, stash, vma_res->start, in ppgtt_bind_vma()
203 vm->insert_entries(vm, vma_res, pat_index, pte_flags); in ppgtt_bind_vma()
207 void ppgtt_unbind_vma(struct i915_address_space *vm, in ppgtt_unbind_vma() argument
[all …]
H A Dintel_ggtt_gmch.c18 static void gmch_ggtt_insert_page(struct i915_address_space *vm, in gmch_ggtt_insert_page() argument
30 static void gmch_ggtt_insert_entries(struct i915_address_space *vm, in gmch_ggtt_insert_entries() argument
47 static void gmch_ggtt_clear_range(struct i915_address_space *vm, in gmch_ggtt_clear_range() argument
53 static void gmch_ggtt_remove(struct i915_address_space *vm) in gmch_ggtt_remove() argument
79 struct drm_i915_private *i915 = ggtt->vm.i915; in intel_ggtt_gmch_probe()
89 intel_gmch_gtt_get(&ggtt->vm.total, &gmadr_base, &ggtt->mappable_end); in intel_ggtt_gmch_probe()
93 ggtt->vm.alloc_pt_dma = alloc_pt_dma; in intel_ggtt_gmch_probe()
94 ggtt->vm.alloc_scratch_dma = alloc_pt_dma; in intel_ggtt_gmch_probe()
102 ggtt->vm.insert_page = gmch_ggtt_insert_page; in intel_ggtt_gmch_probe()
103 ggtt->vm.insert_entries = gmch_ggtt_insert_entries; in intel_ggtt_gmch_probe()
[all …]
/openbsd-src/sys/dev/pci/drm/amd/amdgpu/
H A Damdgpu_vm.c179 * @vm: pointer to the amdgpu_vm structure to set the fence sequence on
181 struct amdgpu_vm *vm; member
190 * amdgpu_vm_set_pasid - manage pasid and vm ptr mapping
193 * @vm: amdgpu_vm pointer
200 int amdgpu_vm_set_pasid(struct amdgpu_device *adev, struct amdgpu_vm *vm, in amdgpu_vm_set_pasid() argument
205 if (vm->pasid == pasid) in amdgpu_vm_set_pasid()
208 if (vm->pasid) { in amdgpu_vm_set_pasid()
209 r = xa_err(xa_erase_irq(&adev->vm_manager.pasids, vm->pasid)); in amdgpu_vm_set_pasid()
213 vm->pasid = 0; in amdgpu_vm_set_pasid()
217 r = xa_err(xa_store_irq(&adev->vm_manager.pasids, pasid, vm, in amdgpu_vm_set_pasid()
239 struct amdgpu_vm *vm = vm_bo->vm; amdgpu_vm_bo_evicted() local
337 amdgpu_vm_bo_reset_state_machine(struct amdgpu_vm * vm) amdgpu_vm_bo_reset_state_machine() argument
368 amdgpu_vm_bo_base_init(struct amdgpu_vm_bo_base * base,struct amdgpu_vm * vm,struct amdgpu_bo * bo) amdgpu_vm_bo_base_init() argument
412 amdgpu_vm_lock_pd(struct amdgpu_vm * vm,struct drm_exec * exec,unsigned int num_fences) amdgpu_vm_lock_pd() argument
430 amdgpu_vm_move_to_lru_tail(struct amdgpu_device * adev,struct amdgpu_vm * vm) amdgpu_vm_move_to_lru_tail() argument
439 amdgpu_vm_init_entities(struct amdgpu_device * adev,struct amdgpu_vm * vm) amdgpu_vm_init_entities() argument
459 amdgpu_vm_fini_entities(struct amdgpu_vm * vm) amdgpu_vm_fini_entities() argument
474 amdgpu_vm_generation(struct amdgpu_device * adev,struct amdgpu_vm * vm) amdgpu_vm_generation() argument
502 amdgpu_vm_validate_pt_bos(struct amdgpu_device * adev,struct amdgpu_vm * vm,int (* validate)(void * p,struct amdgpu_bo * bo),void * param) amdgpu_vm_validate_pt_bos() argument
566 amdgpu_vm_ready(struct amdgpu_vm * vm) amdgpu_vm_ready() argument
775 amdgpu_vm_bo_find(struct amdgpu_vm * vm,struct amdgpu_bo * bo) amdgpu_vm_bo_find() argument
829 amdgpu_vm_update_pdes(struct amdgpu_device * adev,struct amdgpu_vm * vm,bool immediate) amdgpu_vm_update_pdes() argument
923 amdgpu_vm_update_range(struct amdgpu_device * adev,struct amdgpu_vm * vm,bool immediate,bool unlocked,bool flush_tlb,struct dma_resv * resv,uint64_t start,uint64_t last,uint64_t flags,uint64_t offset,uint64_t vram_base,struct ttm_resource * res,dma_addr_t * pages_addr,struct dma_fence ** fence) amdgpu_vm_update_range() argument
1070 struct amdgpu_vm *vm = bo_va->base.vm; amdgpu_vm_bo_get_memory() local
1089 amdgpu_vm_get_memory(struct amdgpu_vm * vm,struct amdgpu_mem_stats * stats) amdgpu_vm_get_memory() argument
1131 struct amdgpu_vm *vm = bo_va->base.vm; amdgpu_vm_bo_update() local
1343 amdgpu_vm_free_mapping(struct amdgpu_device * adev,struct amdgpu_vm * vm,struct amdgpu_bo_va_mapping * mapping,struct dma_fence * fence) amdgpu_vm_free_mapping() argument
1360 amdgpu_vm_prt_fini(struct amdgpu_device * adev,struct amdgpu_vm * vm) amdgpu_vm_prt_fini() argument
1389 amdgpu_vm_clear_freed(struct amdgpu_device * adev,struct amdgpu_vm * vm,struct dma_fence ** fence) amdgpu_vm_clear_freed() argument
1443 amdgpu_vm_handle_moved(struct amdgpu_device * adev,struct amdgpu_vm * vm) amdgpu_vm_handle_moved() argument
1505 amdgpu_vm_bo_add(struct amdgpu_device * adev,struct amdgpu_vm * vm,struct amdgpu_bo * bo) amdgpu_vm_bo_add() argument
1548 struct amdgpu_vm *vm = bo_va->base.vm; amdgpu_vm_bo_insert_map() local
1620 struct amdgpu_vm *vm = bo_va->base.vm; amdgpu_vm_bo_map() local
1729 struct amdgpu_vm *vm = bo_va->base.vm; amdgpu_vm_bo_unmap() local
1779 amdgpu_vm_bo_clear_mappings(struct amdgpu_device * adev,struct amdgpu_vm * vm,uint64_t saddr,uint64_t size) amdgpu_vm_bo_clear_mappings() argument
1897 amdgpu_vm_bo_lookup_mapping(struct amdgpu_vm * vm,uint64_t addr) amdgpu_vm_bo_lookup_mapping() argument
1911 amdgpu_vm_bo_trace_cs(struct amdgpu_vm * vm,struct ww_acquire_ctx * ticket) amdgpu_vm_bo_trace_cs() argument
1948 struct amdgpu_vm *vm = bo_va->base.vm; amdgpu_vm_bo_del() local
2047 struct amdgpu_vm *vm = bo_base->vm; amdgpu_vm_bo_invalidate() local
2195 amdgpu_vm_wait_idle(struct amdgpu_vm * vm,long timeout) amdgpu_vm_wait_idle() argument
2218 amdgpu_vm_init(struct amdgpu_device * adev,struct amdgpu_vm * vm,int32_t xcp_id) amdgpu_vm_init() argument
2332 amdgpu_vm_make_compute(struct amdgpu_device * adev,struct amdgpu_vm * vm) amdgpu_vm_make_compute() argument
2405 amdgpu_vm_release_compute(struct amdgpu_device * adev,struct amdgpu_vm * vm) amdgpu_vm_release_compute() argument
2420 amdgpu_vm_fini(struct amdgpu_device * adev,struct amdgpu_vm * vm) amdgpu_vm_fini() argument
2600 struct amdgpu_vm *vm; amdgpu_vm_get_task_info() local
2617 amdgpu_vm_set_task_info(struct amdgpu_vm * vm) amdgpu_vm_set_task_info() argument
2665 struct amdgpu_vm *vm; amdgpu_vm_handle_fault() local
2755 amdgpu_debugfs_vm_bo_info(struct amdgpu_vm * vm,struct seq_file * m) amdgpu_debugfs_vm_bo_info() argument
[all...]
H A Damdgpu_vm.h151 struct amdgpu_vm *vm; member
209 struct amdgpu_vm *vm; member
409 int amdgpu_vm_set_pasid(struct amdgpu_device *adev, struct amdgpu_vm *vm,
412 long amdgpu_vm_wait_idle(struct amdgpu_vm *vm, long timeout);
413 int amdgpu_vm_init(struct amdgpu_device *adev, struct amdgpu_vm *vm, int32_t xcp_id);
414 int amdgpu_vm_make_compute(struct amdgpu_device *adev, struct amdgpu_vm *vm);
415 void amdgpu_vm_release_compute(struct amdgpu_device *adev, struct amdgpu_vm *vm);
416 void amdgpu_vm_fini(struct amdgpu_device *adev, struct amdgpu_vm *vm);
417 int amdgpu_vm_lock_pd(struct amdgpu_vm *vm, struct drm_exec *exec,
419 bool amdgpu_vm_ready(struct amdgpu_vm *vm);
[all …]
H A Damdgpu_vm_pt.c166 * @vm: amdgpu_vm structure
173 struct amdgpu_vm *vm, uint64_t start, in amdgpu_vm_pt_start() argument
178 cursor->entry = &vm->root; in amdgpu_vm_pt_start()
295 * @vm: amdgpu_vm structure
302 struct amdgpu_vm *vm, in amdgpu_vm_pt_first_dfs() argument
309 amdgpu_vm_pt_start(adev, vm, 0, cursor); in amdgpu_vm_pt_first_dfs()
356 #define for_each_amdgpu_vm_pt_dfs_safe(adev, vm, start, cursor, entry) \ argument
357 for (amdgpu_vm_pt_first_dfs((adev), (vm), (start), &(cursor)), \
366 * @vm: VM to clear BO from
375 int amdgpu_vm_pt_clear(struct amdgpu_device *adev, struct amdgpu_vm *vm, in amdgpu_vm_pt_clear() argument
503 amdgpu_vm_pt_create(struct amdgpu_device * adev,struct amdgpu_vm * vm,int level,bool immediate,struct amdgpu_bo_vm ** vmbo,int32_t xcp_id) amdgpu_vm_pt_create() argument
597 amdgpu_vm_pt_alloc(struct amdgpu_device * adev,struct amdgpu_vm * vm,struct amdgpu_vm_pt_cursor * cursor,bool immediate) amdgpu_vm_pt_alloc() argument
663 struct amdgpu_vm *vm; amdgpu_vm_pt_free_work() local
692 amdgpu_vm_pt_free_dfs(struct amdgpu_device * adev,struct amdgpu_vm * vm,struct amdgpu_vm_pt_cursor * start,bool unlocked) amdgpu_vm_pt_free_dfs() argument
725 amdgpu_vm_pt_free_root(struct amdgpu_device * adev,struct amdgpu_vm * vm) amdgpu_vm_pt_free_root() argument
744 amdgpu_vm_pt_is_root_clean(struct amdgpu_device * adev,struct amdgpu_vm * vm) amdgpu_vm_pt_is_root_clean() argument
770 struct amdgpu_vm *vm = params->vm; amdgpu_vm_pde_update() local
1023 struct amdgpu_vm *vm = params->vm; amdgpu_vm_ptes_update() local
1089 amdgpu_vm_pt_map_tables(struct amdgpu_device * adev,struct amdgpu_vm * vm) amdgpu_vm_pt_map_tables() argument
[all...]
/openbsd-src/sys/dev/pci/drm/i915/selftests/
H A Dmock_gtt.c27 static void mock_insert_page(struct i915_address_space *vm, in mock_insert_page() argument
35 static void mock_insert_entries(struct i915_address_space *vm, in mock_insert_entries() argument
41 static void mock_bind_ppgtt(struct i915_address_space *vm, in mock_bind_ppgtt() argument
51 static void mock_unbind_ppgtt(struct i915_address_space *vm, in mock_unbind_ppgtt() argument
56 static void mock_cleanup(struct i915_address_space *vm) in mock_cleanup() argument
60 static void mock_clear_range(struct i915_address_space *vm, in mock_clear_range() argument
73 ppgtt->vm.gt = to_gt(i915); in mock_ppgtt()
74 ppgtt->vm.i915 = i915; in mock_ppgtt()
75 ppgtt->vm.total = round_down(U64_MAX, PAGE_SIZE); in mock_ppgtt()
76 ppgtt->vm.dma = i915->drm.dev; in mock_ppgtt()
[all …]
H A Di915_gem_gtt.c170 if (!ppgtt->vm.allocate_va_range) in igt_ppgtt_alloc()
181 limit = min(ppgtt->vm.total, limit); in igt_ppgtt_alloc()
185 err = i915_vm_lock_objects(&ppgtt->vm, &ww); in igt_ppgtt_alloc()
193 err = i915_vm_alloc_pt_stash(&ppgtt->vm, &stash, size); in igt_ppgtt_alloc()
197 err = i915_vm_map_pt_stash(&ppgtt->vm, &stash); in igt_ppgtt_alloc()
199 i915_vm_free_pt_stash(&ppgtt->vm, &stash); in igt_ppgtt_alloc()
203 ppgtt->vm.allocate_va_range(&ppgtt->vm, &stash, 0, size); in igt_ppgtt_alloc()
206 ppgtt->vm.clear_range(&ppgtt->vm, 0, size); in igt_ppgtt_alloc()
208 i915_vm_free_pt_stash(&ppgtt->vm, &stash); in igt_ppgtt_alloc()
215 err = i915_vm_alloc_pt_stash(&ppgtt->vm, &stash, size - last); in igt_ppgtt_alloc()
[all …]
H A Di915_gem_evict.c57 obj = i915_gem_object_create_internal(ggtt->vm.i915, in populate_ggtt()
75 count, ggtt->vm.total / PAGE_SIZE); in populate_ggtt()
77 if (list_empty(&ggtt->vm.bound_list)) { in populate_ggtt()
89 list_for_each_entry(vma, &ggtt->vm.bound_list, vm_link) in unpin_ggtt()
104 i915_gem_drain_freed_objects(ggtt->vm.i915); in cleanup_objects()
121 mutex_lock(&ggtt->vm.mutex); in igt_evict_something()
122 err = i915_gem_evict_something(&ggtt->vm, NULL, in igt_evict_something()
126 mutex_unlock(&ggtt->vm.mutex); in igt_evict_something()
136 mutex_lock(&ggtt->vm.mutex); in igt_evict_something()
137 err = i915_gem_evict_something(&ggtt->vm, NULL, in igt_evict_something()
[all …]
/openbsd-src/sys/dev/vmm/
H A Dvmm.c71 pool_init(&vm_pool, sizeof(struct vm), 0, IPL_MPFLOOR, PR_WAITOK, in vmm_attach()
170 vm_find(uint32_t id, struct vm **res) in vm_find()
173 struct vm *vm; in vm_find() local
179 SLIST_FOREACH(vm, &vmm_softc->vm_list, vm_link) { in vm_find()
180 if (vm->vm_id == id) { in vm_find()
189 (vm->vm_creator_pid != p->p_p->ps_pid)) in vm_find()
192 refcnt_take(&vm->vm_refcnt); in vm_find()
193 *res = vm; in vm_find()
319 * vm
325 vm_find_vcpu(struct vm * vm,uint32_t id) vm_find_vcpu() argument
357 struct vm *vm; vm_create() local
534 struct vm *vm = *target; vm_teardown() local
585 struct vm *vm; vm_get_info() local
662 struct vm *vm; vm_terminate() local
719 struct vm *vm; vm_resetcpu() local
805 struct vm *vm; vm_share_mem() local
[all...]
/openbsd-src/usr.sbin/vmd/
H A Dvmd.c102 struct vmd_vm *vm = NULL; in vmd_dispatch_control()
114 if (vm_register(ps, &vmc, &vm, 0, vmc.vmc_owner.uid)) { in vmd_dispatch_control()
118 if (vm == NULL) { in vmd_dispatch_control()
126 if (vm->vm_state & VM_STATE_RUNNING) { in vmd_dispatch_control()
142 res = config_setvm(ps, vm, imsg->hdr.peerid, in vmd_dispatch_control()
143 vm->vm_params.vmc_owner.uid); in vmd_dispatch_control()
155 /* Lookup vm (id) by name */ in vmd_dispatch_control()
156 if ((vm = vm_getbyname(vid.vid_name)) == NULL) { in vmd_dispatch_control()
160 id = vm->vm_vmid; in vmd_dispatch_control()
161 } else if ((vm in vmd_dispatch_control()
104 struct vmd_vm *vm = NULL; vmd_dispatch_control() local
368 struct vmd_vm *vm; vmd_dispatch_vmm() local
854 struct vmd_vm *vm; start_vm_batch() local
956 struct vmd_vm *vm, *next_vm; vmd_reload() local
1028 struct vmd_vm *vm, *vm_next; vmd_shutdown() local
1046 struct vmd_vm *vm; vm_getbyvmid() local
1061 struct vmd_vm *vm; vm_getbyid() local
1074 vm_id2vmid(uint32_t id,struct vmd_vm * vm) vm_id2vmid() argument
1084 vm_vmid2id(uint32_t vmid,struct vmd_vm * vm) vm_vmid2id() argument
1096 struct vmd_vm *vm; vm_getbyname() local
1111 struct vmd_vm *vm; vm_getbypid() local
1122 vm_stop(struct vmd_vm * vm,int keeptty,const char * caller) vm_stop() argument
1176 vm_remove(struct vmd_vm * vm,const char * caller) vm_remove() argument
1230 struct vmd_vm *vm = NULL, *vm_parent = NULL; vm_register() local
1576 vm_checkperm(struct vmd_vm * vm,struct vmop_owner * vmo,uid_t uid) vm_checkperm() argument
1715 vm_opentty(struct vmd_vm * vm) vm_opentty() argument
1800 vm_closetty(struct vmd_vm * vm) vm_closetty() argument
1897 vm_terminate(struct vmd_vm * vm,const char * caller) vm_terminate() argument
[all...]
H A Dvmm.c82 * proc, exec - for forking and execing new vm's. in vmm_run()
83 * sendfd - for sending send/recv fds to vm proc. in vmm_run()
99 struct vmd_vm *vm = NULL; in vmm_run()
157 } else if ((vm = vm_getbyvmid(id)) != NULL) { in vmm_dispatch_parent()
159 vtp.vtp_vm_id = vm_vmid2id(vm->vm_vmid, vm); in vmm_dispatch_parent()
160 vm->vm_state |= VM_STATE_SHUTDOWN; in vmm_dispatch_parent()
163 } else if (!(vm->vm_state & VM_STATE_SHUTDOWN)) { in vmm_dispatch_parent()
165 " to vm %d", __func__, id); in vmm_dispatch_parent()
174 vm in vmm_dispatch_parent()
109 struct vmd_vm *vm = NULL; vmm_dispatch_parent() local
376 struct vmd_vm *vm; vmm_sighdlr() local
445 struct vmd_vm *vm, *vm_next; vmm_shutdown() local
463 vmm_pipe(struct vmd_vm * vm,int fd,void (* cb)(int,short,void *)) vmm_pipe() argument
494 struct vmd_vm *vm = arg; vmm_dispatch_vm() local
647 struct vmd_vm *vm; vmm_start_vm() local
[all...]
H A Dconfig.c103 struct vmd_vm *vm;
116 while ((vm = TAILQ_FIRST(env->vmd_vms)) != NULL) { in config_purge()
117 vm_remove(vm, __func__); in config_purge()
201 * Configure a vm, opening any required file descriptors. in config_getreset()
206 config_setvm(struct privsep *ps, struct vmd_vm *vm, uint32_t peerid, uid_t uid)
210 struct vmop_create_params *vmc = &vm->vm_params;
223 if (vm->vm_state & VM_STATE_RUNNING) { in config_setvm()
224 log_warnx("%s: vm is already running", __func__); in config_setvm()
235 if (vm->vm_start_tv.tv_sec) { in config_setvm()
236 timersub(&tv, &vm in config_setvm()
108 struct vmd_vm *vm; config_purge() local
211 config_setvm(struct privsep * ps,struct vmd_vm * vm,uint32_t peerid,uid_t uid) config_setvm() argument
563 struct vmd_vm *vm = NULL; config_getvm() local
594 struct vmd_vm *vm; config_getdisk() local
626 struct vmd_vm *vm; config_getif() local
657 struct vmd_vm *vm; config_getcdrom() local
[all...]
H A Dvm.c1 /* $OpenBSD: vm.c,v 1.110 2024/11/21 13:25:30 claudio Exp $ */
86 * Primary entrypoint for launching a vm. Does not return.
95 struct vmd_vm vm;
100 * The vm process relies on global state. Set the fd for /dev/vmm.
113 * pledge in the vm processes: in vm_main()
117 * recvfd - for vm send/recv and sending fd to devices. in vm_main()
122 /* Receive our vm configuration. */ in vm_main()
123 memset(&vm, 0, sizeof(vm)); in vm_main()
124 sz = atomicio(read, fd, &vm, sizeo in vm_main()
106 struct vmd_vm vm; vm_main() local
193 start_vm(struct vmd_vm * vm,int fd) start_vm() argument
335 struct vmd_vm *vm = arg; vm_dispatch_vmm() local
463 send_vm(int fd,struct vmd_vm * vm) send_vm() argument
558 dump_mem(int fd,struct vmd_vm * vm) dump_mem() argument
643 pause_vm(struct vmd_vm * vm) pause_vm() argument
690 unpause_vm(struct vmd_vm * vm) unpause_vm() argument
771 alloc_guest_mem(struct vmd_vm * vm) alloc_guest_mem() argument
820 vmm_create_vm(struct vmd_vm * vm) vmm_create_vm() argument
1367 remap_guest_mem(struct vmd_vm * vm,int vmm_fd) remap_guest_mem() argument
[all...]
/openbsd-src/sys/dev/pci/drm/i915/display/
H A Dintel_dpt.c19 struct i915_address_space vm; member
26 #define i915_is_dpt(vm) ((vm)->is_dpt) argument
29 i915_vm_to_dpt(struct i915_address_space *vm) in i915_vm_to_dpt() argument
31 BUILD_BUG_ON(offsetof(struct i915_dpt, vm)); in i915_vm_to_dpt()
32 GEM_BUG_ON(!i915_is_dpt(vm)); in i915_vm_to_dpt()
33 return container_of(vm, struct i915_dpt, vm); in i915_vm_to_dpt()
36 #define dpt_total_entries(dpt) ((dpt)->vm.total >> PAGE_SHIFT)
43 static void dpt_insert_page(struct i915_address_space *vm, in dpt_insert_page() argument
49 struct i915_dpt *dpt = i915_vm_to_dpt(vm); in dpt_insert_page()
53 vm->pte_encode(addr, pat_index, flags)); in dpt_insert_page()
[all …]
/openbsd-src/sys/dev/pci/drm/radeon/
H A Dradeon_vm.c130 struct radeon_vm *vm, in radeon_vm_get_bos() argument
136 list = kvmalloc_array(vm->max_pde_used + 2, in radeon_vm_get_bos()
142 list[0].robj = vm->page_directory; in radeon_vm_get_bos()
145 list[0].tv.bo = &vm->page_directory->tbo; in radeon_vm_get_bos()
150 for (i = 0, idx = 1; i <= vm->max_pde_used; i++) { in radeon_vm_get_bos()
151 if (!vm->page_tables[i].bo) in radeon_vm_get_bos()
154 list[idx].robj = vm->page_tables[i].bo; in radeon_vm_get_bos()
179 struct radeon_vm *vm, int ring) in radeon_vm_grab_id() argument
182 struct radeon_vm_id *vm_id = &vm->ids[ring]; in radeon_vm_grab_id()
238 struct radeon_vm *vm, in radeon_vm_flush() argument
[all …]
/openbsd-src/lib/libkvm/
H A Dkvm_i386.c99 #define pdei(vm,VA) (((VA) & (vm)->PD_mask) >> (vm)->PD_shift) argument
100 #define ptei(vm,VA) (((VA) & (vm)->PT_mask) >> PAGE_SHIFT) argument
117 struct vmstate *vm; in _kvm_initvtop() local
120 vm = _kvm_malloc(kd, sizeof(*vm)); in _kvm_initvtop()
121 if (vm == NULL) in _kvm_initvtop()
123 kd->vmst = vm; in _kvm_initvtop()
125 vm->PTD = NULL; in _kvm_initvtop()
149 vm->PTD = _kvm_malloc(kd, PTDsize); in _kvm_initvtop()
151 if (_kvm_pread(kd, kd->pmfd, vm->PTD, PTDsize, in _kvm_initvtop()
156 vm->PD_mask = PAE_PD_MASK; in _kvm_initvtop()
[all …]
H A Dkvm_mips64.c82 struct vmstate *vm; in _kvm_initvtop() local
86 vm = (struct vmstate *)_kvm_malloc(kd, sizeof(*vm)); in _kvm_initvtop()
87 if (vm == 0) in _kvm_initvtop()
89 kd->vmst = vm; in _kvm_initvtop()
100 if (KREAD(kd, (u_long)nl[0].n_value, &vm->Sysmap)) { in _kvm_initvtop()
104 if (KREAD(kd, (u_long)nl[1].n_value, &vm->Sysmapsize)) { in _kvm_initvtop()
118 vm->pagesize = uvmexp.pagesize; in _kvm_initvtop()
119 vm->pagemask = uvmexp.pagemask; in _kvm_initvtop()
120 vm->pageshift = uvmexp.pageshift; in _kvm_initvtop()
130 KREAD(kd, (u_long)nl[0].n_value, &vm->Sysmapbase)) in _kvm_initvtop()
[all …]
/openbsd-src/gnu/llvm/llvm/lib/Target/VE/
H A DVEInstrIntrinsicVL.gen.td67 …ssml v256f64:$vx, i64:$sy, i64:$sz, v256i1:$vm, i32:$vl), (VSTrrvml i64:$sy, i64:$sz, v256f64:$vx,…
68 …ml v256f64:$vx, simm7:$I, i64:$sz, v256i1:$vm, i32:$vl), (VSTirvml (LO7 $I), i64:$sz, v256f64:$vx,…
71 …sml v256f64:$vx, i64:$sy, i64:$sz, v256i1:$vm, i32:$vl), (VSTNCrrvml i64:$sy, i64:$sz, v256f64:$vx…
72 …l v256f64:$vx, simm7:$I, i64:$sz, v256i1:$vm, i32:$vl), (VSTNCirvml (LO7 $I), i64:$sz, v256f64:$vx…
75 …sml v256f64:$vx, i64:$sy, i64:$sz, v256i1:$vm, i32:$vl), (VSTOTrrvml i64:$sy, i64:$sz, v256f64:$vx…
76 …l v256f64:$vx, simm7:$I, i64:$sz, v256i1:$vm, i32:$vl), (VSTOTirvml (LO7 $I), i64:$sz, v256f64:$vx…
79 …ml v256f64:$vx, i64:$sy, i64:$sz, v256i1:$vm, i32:$vl), (VSTNCOTrrvml i64:$sy, i64:$sz, v256f64:$v…
80 … v256f64:$vx, simm7:$I, i64:$sz, v256i1:$vm, i32:$vl), (VSTNCOTirvml (LO7 $I), i64:$sz, v256f64:$v…
83 …sml v256f64:$vx, i64:$sy, i64:$sz, v256i1:$vm, i32:$vl), (VSTUrrvml i64:$sy, i64:$sz, v256f64:$vx,…
84 …ml v256f64:$vx, simm7:$I, i64:$sz, v256i1:$vm, i32:$vl), (VSTUirvml (LO7 $I), i64:$sz, v256f64:$vx…
[all …]
/openbsd-src/sys/dev/pci/drm/i915/
H A Di915_vma_resource.c175 struct i915_address_space *vm; in __i915_vma_resource_unhold() local
182 vm = vma_res->vm; in __i915_vma_resource_unhold()
184 intel_runtime_pm_put(&vm->i915->runtime_pm, vma_res->wakeref); in __i915_vma_resource_unhold()
186 vma_res->vm = NULL; in __i915_vma_resource_unhold()
188 mutex_lock(&vm->mutex); in __i915_vma_resource_unhold()
189 vma_res_itree_remove(vma_res, &vm->pending_unbind); in __i915_vma_resource_unhold()
190 mutex_unlock(&vm->mutex); in __i915_vma_resource_unhold()
247 struct i915_address_space *vm = vma_res->vm; in i915_vma_resource_unbind_work() local
252 vma_res->ops->unbind_vma(vm, vma_res); in i915_vma_resource_unbind_work()
303 struct i915_address_space *vm = vma_res->vm; in i915_vma_resource_unbind() local
[all …]
H A Di915_gem_evict.c46 static int ggtt_flush(struct i915_address_space *vm) in ggtt_flush() argument
48 struct i915_ggtt *ggtt = i915_vm_to_ggtt(vm); in ggtt_flush()
148 i915_gem_evict_something(struct i915_address_space *vm, in i915_gem_evict_something() argument
164 lockdep_assert_held(&vm->mutex); in i915_gem_evict_something()
165 trace_i915_gem_evict(vm, min_size, alignment, flags); in i915_gem_evict_something()
183 drm_mm_scan_init_with_range(&scan, &vm->mm, in i915_gem_evict_something()
187 if (i915_is_ggtt(vm)) { in i915_gem_evict_something()
188 struct i915_ggtt *ggtt = i915_vm_to_ggtt(vm); in i915_gem_evict_something()
193 intel_gt_retire_requests(vm->gt); in i915_gem_evict_something()
199 list_for_each_entry_safe(vma, next, &vm->bound_list, vm_link) { in i915_gem_evict_something()
[all …]

12345678910>>...12