Home
last modified time | relevance | path

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

12345678910>>...20

/linux-6.6.21/drivers/virtio/
Dvirtio_mem.c278 static void virtio_mem_retry(struct virtio_mem *vm);
279 static int virtio_mem_create_resource(struct virtio_mem *vm);
280 static void virtio_mem_delete_resource(struct virtio_mem *vm);
286 static int register_virtio_mem_device(struct virtio_mem *vm) in register_virtio_mem_device() argument
295 list_add_rcu(&vm->next, &virtio_mem_devices); in register_virtio_mem_device()
305 static void unregister_virtio_mem_device(struct virtio_mem *vm) in unregister_virtio_mem_device() argument
309 list_del_rcu(&vm->next); in unregister_virtio_mem_device()
336 static unsigned long virtio_mem_phys_to_bb_id(struct virtio_mem *vm, in virtio_mem_phys_to_bb_id() argument
339 return addr / vm->bbm.bb_size; in virtio_mem_phys_to_bb_id()
345 static uint64_t virtio_mem_bb_id_to_phys(struct virtio_mem *vm, in virtio_mem_bb_id_to_phys() argument
[all …]
/linux-6.6.21/tools/testing/selftests/kvm/lib/aarch64/
Dprocessor.c20 static uint64_t page_align(struct kvm_vm *vm, uint64_t v) in page_align() argument
22 return (v + vm->page_size) & ~(vm->page_size - 1); in page_align()
25 static uint64_t pgd_index(struct kvm_vm *vm, vm_vaddr_t gva) in pgd_index() argument
27 unsigned int shift = (vm->pgtable_levels - 1) * (vm->page_shift - 3) + vm->page_shift; in pgd_index()
28 uint64_t mask = (1UL << (vm->va_bits - shift)) - 1; in pgd_index()
33 static uint64_t pud_index(struct kvm_vm *vm, vm_vaddr_t gva) in pud_index() argument
35 unsigned int shift = 2 * (vm->page_shift - 3) + vm->page_shift; in pud_index()
36 uint64_t mask = (1UL << (vm->page_shift - 3)) - 1; in pud_index()
38 TEST_ASSERT(vm->pgtable_levels == 4, in pud_index()
39 "Mode %d does not have 4 page table levels", vm->mode); in pud_index()
[all …]
/linux-6.6.21/tools/testing/selftests/kvm/s390x/
Dcmma_test.c102 static void create_main_memslot(struct kvm_vm *vm) in create_main_memslot() argument
106 vm_userspace_mem_region_add(vm, VM_MEM_SRC_ANONYMOUS, 0, 0, MAIN_PAGE_COUNT, 0); in create_main_memslot()
109 vm->memslots[i] = 0; in create_main_memslot()
112 static void create_test_memslot(struct kvm_vm *vm) in create_test_memslot() argument
114 vm_userspace_mem_region_add(vm, in create_test_memslot()
116 TEST_DATA_START_GFN << vm->page_shift, in create_test_memslot()
121 vm->memslots[MEM_REGION_TEST_DATA] = TEST_DATA_MEMSLOT; in create_test_memslot()
124 static void create_memslots(struct kvm_vm *vm) in create_memslots() argument
140 create_main_memslot(vm); in create_memslots()
141 create_test_memslot(vm); in create_memslots()
[all …]
/linux-6.6.21/drivers/gpu/drm/i915/gt/
Dintel_ggtt.c52 struct drm_i915_private *i915 = ggtt->vm.i915; in ggtt_init_hw()
54 i915_address_space_init(&ggtt->vm, VM_CLASS_GGTT); in ggtt_init_hw()
56 ggtt->vm.is_ggtt = true; in ggtt_init_hw()
59 ggtt->vm.has_read_only = IS_VALLEYVIEW(i915); in ggtt_init_hw()
62 ggtt->vm.mm.color_adjust = i915_ggtt_color_adjust; in ggtt_init_hw()
68 ggtt->vm.cleanup(&ggtt->vm); in ggtt_init_hw()
109 void i915_ggtt_suspend_vm(struct i915_address_space *vm) in i915_ggtt_suspend_vm() argument
114 drm_WARN_ON(&vm->i915->drm, !vm->is_ggtt && !vm->is_dpt); in i915_ggtt_suspend_vm()
117 i915_gem_drain_freed_objects(vm->i915); in i915_ggtt_suspend_vm()
119 mutex_lock(&vm->mutex); in i915_ggtt_suspend_vm()
[all …]
Dintel_gtt.c35 struct drm_i915_gem_object *alloc_pt_lmem(struct i915_address_space *vm, int sz) in alloc_pt_lmem() argument
51 obj = __i915_gem_object_create_lmem_with_ps(vm->i915, sz, sz, in alloc_pt_lmem()
52 vm->lmem_pt_obj_flags); in alloc_pt_lmem()
59 obj->base.resv = i915_vm_resv_get(vm); in alloc_pt_lmem()
60 obj->shares_resv_from = vm; in alloc_pt_lmem()
66 struct drm_i915_gem_object *alloc_pt_dma(struct i915_address_space *vm, int sz) in alloc_pt_dma() argument
70 if (I915_SELFTEST_ONLY(should_fail(&vm->fault_attr, 1))) in alloc_pt_dma()
71 i915_gem_shrink_all(vm->i915); in alloc_pt_dma()
73 obj = i915_gem_object_create_internal(vm->i915, sz); in alloc_pt_dma()
80 obj->base.resv = i915_vm_resv_get(vm); in alloc_pt_dma()
[all …]
Dintel_gtt.h64 #define ggtt_total_entries(ggtt) ((ggtt)->vm.total >> PAGE_SHIFT)
230 void (*bind_vma)(struct i915_address_space *vm,
239 void (*unbind_vma)(struct i915_address_space *vm,
300 (*alloc_pt_dma)(struct i915_address_space *vm, int sz);
302 (*alloc_scratch_dma)(struct i915_address_space *vm, int sz);
310 void (*allocate_va_range)(struct i915_address_space *vm,
313 void (*clear_range)(struct i915_address_space *vm,
315 void (*scratch_range)(struct i915_address_space *vm,
317 void (*insert_page)(struct i915_address_space *vm,
322 void (*insert_entries)(struct i915_address_space *vm,
[all …]
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 …]
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 …]
/linux-6.6.21/drivers/gpu/drm/lima/
Dlima_vm.c18 struct lima_vm *vm; member
35 static void lima_vm_unmap_range(struct lima_vm *vm, u32 start, u32 end) in lima_vm_unmap_range() argument
43 vm->bts[pbe].cpu[bte] = 0; in lima_vm_unmap_range()
47 static int lima_vm_map_page(struct lima_vm *vm, dma_addr_t pa, u32 va) in lima_vm_map_page() argument
52 if (!vm->bts[pbe].cpu) { in lima_vm_map_page()
57 vm->bts[pbe].cpu = dma_alloc_wc( in lima_vm_map_page()
58 vm->dev->dev, LIMA_PAGE_SIZE << LIMA_VM_NUM_PT_PER_BT_SHIFT, in lima_vm_map_page()
59 &vm->bts[pbe].dma, GFP_KERNEL | __GFP_NOWARN | __GFP_ZERO); in lima_vm_map_page()
60 if (!vm->bts[pbe].cpu) in lima_vm_map_page()
63 pts = vm->bts[pbe].dma; in lima_vm_map_page()
[all …]
/linux-6.6.21/tools/testing/selftests/kvm/lib/
Dkvm_util.c128 void vm_enable_dirty_ring(struct kvm_vm *vm, uint32_t ring_size) in vm_enable_dirty_ring() argument
130 if (vm_check_cap(vm, KVM_CAP_DIRTY_LOG_RING_ACQ_REL)) in vm_enable_dirty_ring()
131 vm_enable_cap(vm, KVM_CAP_DIRTY_LOG_RING_ACQ_REL, ring_size); in vm_enable_dirty_ring()
133 vm_enable_cap(vm, KVM_CAP_DIRTY_LOG_RING, ring_size); in vm_enable_dirty_ring()
134 vm->dirty_ring_size = ring_size; in vm_enable_dirty_ring()
137 static void vm_open(struct kvm_vm *vm) in vm_open() argument
139 vm->kvm_fd = _open_kvm_dev_path_or_exit(O_RDWR); in vm_open()
143 vm->fd = __kvm_ioctl(vm->kvm_fd, KVM_CREATE_VM, (void *)vm->type); in vm_open()
144 TEST_ASSERT(vm->fd >= 0, KVM_IOCTL_ERROR(KVM_CREATE_VM, vm->fd)); in vm_open()
203 __weak void vm_vaddr_populate_bitmap(struct kvm_vm *vm) in vm_vaddr_populate_bitmap() argument
[all …]
/linux-6.6.21/drivers/virt/acrn/
Dvm.c25 struct acrn_vm *acrn_vm_create(struct acrn_vm *vm, in acrn_vm_create() argument
37 mutex_init(&vm->regions_mapping_lock); in acrn_vm_create()
38 INIT_LIST_HEAD(&vm->ioreq_clients); in acrn_vm_create()
39 spin_lock_init(&vm->ioreq_clients_lock); in acrn_vm_create()
40 vm->vmid = vm_param->vmid; in acrn_vm_create()
41 vm->vcpu_num = vm_param->vcpu_num; in acrn_vm_create()
43 if (acrn_ioreq_init(vm, vm_param->ioreq_buf) < 0) { in acrn_vm_create()
45 vm->vmid = ACRN_INVALID_VMID; in acrn_vm_create()
50 list_add(&vm->list, &acrn_vm_list); in acrn_vm_create()
53 acrn_ioeventfd_init(vm); in acrn_vm_create()
[all …]
Dirqfd.c32 struct acrn_vm *vm; member
43 struct acrn_vm *vm = irqfd->vm; in acrn_irqfd_inject() local
45 acrn_msi_inject(vm, irqfd->msi.msi_addr, in acrn_irqfd_inject()
53 lockdep_assert_held(&irqfd->vm->irqfds_lock); in hsm_irqfd_shutdown()
65 struct acrn_vm *vm; in hsm_irqfd_shutdown_work() local
68 vm = irqfd->vm; in hsm_irqfd_shutdown_work()
69 mutex_lock(&vm->irqfds_lock); in hsm_irqfd_shutdown_work()
72 mutex_unlock(&vm->irqfds_lock); in hsm_irqfd_shutdown_work()
81 struct acrn_vm *vm; in hsm_irqfd_wakeup() local
84 vm = irqfd->vm; in hsm_irqfd_wakeup()
[all …]
Dioreq.c39 static int ioreq_complete_request(struct acrn_vm *vm, u16 vcpu, in ioreq_complete_request() argument
64 ret = hcall_notify_req_finish(vm->vmid, vcpu); in ioreq_complete_request()
79 if (vcpu >= client->vm->vcpu_num) in acrn_ioreq_complete_request()
84 acrn_req = (struct acrn_io_request *)client->vm->ioreq_buf; in acrn_ioreq_complete_request()
88 ret = ioreq_complete_request(client->vm, vcpu, acrn_req); in acrn_ioreq_complete_request()
93 int acrn_ioreq_request_default_complete(struct acrn_vm *vm, u16 vcpu) in acrn_ioreq_request_default_complete() argument
97 spin_lock_bh(&vm->ioreq_clients_lock); in acrn_ioreq_request_default_complete()
98 if (vm->default_client) in acrn_ioreq_request_default_complete()
99 ret = acrn_ioreq_complete_request(vm->default_client, in acrn_ioreq_request_default_complete()
101 spin_unlock_bh(&vm->ioreq_clients_lock); in acrn_ioreq_request_default_complete()
[all …]
Dioeventfd.c43 static void acrn_ioeventfd_shutdown(struct acrn_vm *vm, struct hsm_ioeventfd *p) in acrn_ioeventfd_shutdown() argument
45 lockdep_assert_held(&vm->ioeventfds_lock); in acrn_ioeventfd_shutdown()
52 static bool hsm_ioeventfd_is_conflict(struct acrn_vm *vm, in hsm_ioeventfd_is_conflict() argument
57 lockdep_assert_held(&vm->ioeventfds_lock); in hsm_ioeventfd_is_conflict()
60 list_for_each_entry(p, &vm->ioeventfds, list) in hsm_ioeventfd_is_conflict()
76 static int acrn_ioeventfd_assign(struct acrn_vm *vm, in acrn_ioeventfd_assign() argument
121 mutex_lock(&vm->ioeventfds_lock); in acrn_ioeventfd_assign()
123 if (hsm_ioeventfd_is_conflict(vm, p)) { in acrn_ioeventfd_assign()
129 ret = acrn_ioreq_range_add(vm->ioeventfd_client, p->type, in acrn_ioeventfd_assign()
134 list_add_tail(&p->list, &vm->ioeventfds); in acrn_ioeventfd_assign()
[all …]
/linux-6.6.21/tools/testing/selftests/kvm/lib/s390x/
Dprocessor.c13 void virt_arch_pgd_alloc(struct kvm_vm *vm) in virt_arch_pgd_alloc() argument
17 TEST_ASSERT(vm->page_size == 4096, "Unsupported page size: 0x%x", in virt_arch_pgd_alloc()
18 vm->page_size); in virt_arch_pgd_alloc()
20 if (vm->pgd_created) in virt_arch_pgd_alloc()
23 paddr = vm_phy_pages_alloc(vm, PAGES_PER_REGION, in virt_arch_pgd_alloc()
25 vm->memslots[MEM_REGION_PT]); in virt_arch_pgd_alloc()
26 memset(addr_gpa2hva(vm, paddr), 0xff, PAGES_PER_REGION * vm->page_size); in virt_arch_pgd_alloc()
28 vm->pgd = paddr; in virt_arch_pgd_alloc()
29 vm->pgd_created = true; in virt_arch_pgd_alloc()
37 static uint64_t virt_alloc_region(struct kvm_vm *vm, int ri) in virt_alloc_region() argument
[all …]
/linux-6.6.21/drivers/gpu/drm/i915/selftests/
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 …]
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 …]
/linux-6.6.21/drivers/gpu/drm/amd/amdgpu/
Damdgpu_vm.c121 struct amdgpu_vm *vm; member
140 int amdgpu_vm_set_pasid(struct amdgpu_device *adev, struct amdgpu_vm *vm, in amdgpu_vm_set_pasid() argument
145 if (vm->pasid == pasid) in amdgpu_vm_set_pasid()
148 if (vm->pasid) { in amdgpu_vm_set_pasid()
149 r = xa_err(xa_erase_irq(&adev->vm_manager.pasids, vm->pasid)); in amdgpu_vm_set_pasid()
153 vm->pasid = 0; in amdgpu_vm_set_pasid()
157 r = xa_err(xa_store_irq(&adev->vm_manager.pasids, pasid, vm, in amdgpu_vm_set_pasid()
162 vm->pasid = pasid; in amdgpu_vm_set_pasid()
179 struct amdgpu_vm *vm = vm_bo->vm; in amdgpu_vm_bo_evicted() local
183 spin_lock(&vm_bo->vm->status_lock); in amdgpu_vm_bo_evicted()
[all …]
/linux-6.6.21/sound/pci/ctxfi/
Dctvmem.c30 get_vm_block(struct ct_vm *vm, unsigned int size, struct ct_atc *atc) in get_vm_block() argument
36 if (size > vm->size) { in get_vm_block()
42 mutex_lock(&vm->lock); in get_vm_block()
43 list_for_each(pos, &vm->unused) { in get_vm_block()
48 if (pos == &vm->unused) in get_vm_block()
53 list_move(&entry->list, &vm->used); in get_vm_block()
54 vm->size -= size; in get_vm_block()
65 list_add(&block->list, &vm->used); in get_vm_block()
68 vm->size -= size; in get_vm_block()
71 mutex_unlock(&vm->lock); in get_vm_block()
[all …]
/linux-6.6.21/tools/testing/selftests/kvm/aarch64/
Dsmccc_filter.c40 static int __set_smccc_filter(struct kvm_vm *vm, uint32_t start, uint32_t nr_functions, in __set_smccc_filter() argument
49 return __kvm_device_attr_set(vm->fd, KVM_ARM_VM_SMCCC_CTRL, in __set_smccc_filter()
53 static void set_smccc_filter(struct kvm_vm *vm, uint32_t start, uint32_t nr_functions, in set_smccc_filter() argument
56 int ret = __set_smccc_filter(vm, start, nr_functions, action); in set_smccc_filter()
64 struct kvm_vm *vm; in setup_vm() local
66 vm = vm_create(1); in setup_vm()
67 vm_ioctl(vm, KVM_ARM_PREFERRED_TARGET, &init); in setup_vm()
75 *vcpu = aarch64_vcpu_add(vm, 0, &init, guest_main); in setup_vm()
76 return vm; in setup_vm()
82 struct kvm_vm *vm = setup_vm(&vcpu); in test_pad_must_be_zero() local
[all …]
/linux-6.6.21/drivers/gpu/drm/i915/display/
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 …]
/linux-6.6.21/tools/testing/selftests/kvm/lib/riscv/
Dprocessor.c16 static uint64_t page_align(struct kvm_vm *vm, uint64_t v) in page_align() argument
18 return (v + vm->page_size) & ~(vm->page_size - 1); in page_align()
21 static uint64_t pte_addr(struct kvm_vm *vm, uint64_t entry) in pte_addr() argument
27 static uint64_t ptrs_per_pte(struct kvm_vm *vm) in ptrs_per_pte() argument
46 static uint64_t pte_index(struct kvm_vm *vm, vm_vaddr_t gva, int level) in pte_index() argument
50 TEST_ASSERT(level < vm->pgtable_levels, in pte_index()
56 void virt_arch_pgd_alloc(struct kvm_vm *vm) in virt_arch_pgd_alloc() argument
58 size_t nr_pages = page_align(vm, ptrs_per_pte(vm) * 8) / vm->page_size; in virt_arch_pgd_alloc()
60 if (vm->pgd_created) in virt_arch_pgd_alloc()
63 vm->pgd = vm_phy_pages_alloc(vm, nr_pages, in virt_arch_pgd_alloc()
[all …]
/linux-6.6.21/drivers/gpu/drm/radeon/
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 …]
/linux-6.6.21/tools/testing/selftests/kvm/x86_64/
Dnx_huge_pages_test.c75 static void check_2m_page_count(struct kvm_vm *vm, int expected_pages_2m) in check_2m_page_count() argument
79 actual_pages_2m = vm_get_stat(vm, "pages_2m"); in check_2m_page_count()
86 static void check_split_count(struct kvm_vm *vm, int expected_splits) in check_split_count() argument
90 actual_splits = vm_get_stat(vm, "nx_lpage_splits"); in check_split_count()
112 struct kvm_vm *vm; in run_test() local
117 vm = vm_create(1); in run_test()
120 r = __vm_disable_nx_huge_pages(vm); in run_test()
130 vcpu = vm_vcpu_add(vm, 0, guest_code); in run_test()
132 vm_userspace_mem_region_add(vm, VM_MEM_SRC_ANONYMOUS_HUGETLB, in run_test()
136 nr_bytes = HPAGE_SLOT_NPAGES * vm->page_size; in run_test()
[all …]
/linux-6.6.21/tools/testing/selftests/kvm/include/
Dkvm_util_base.h66 struct kvm_vm *vm; member
149 #define kvm_for_each_vcpu(vm, i, vcpu) \ argument
150 for ((i) = 0; (i) <= (vm)->last_vcpu_id; (i)++) \
151 if (!((vcpu) = vm->vcpus[i])) \
156 memslot2region(struct kvm_vm *vm, uint32_t memslot);
158 static inline struct userspace_mem_region *vm_get_mem_region(struct kvm_vm *vm, in vm_get_mem_region() argument
162 return memslot2region(vm, vm->memslots[type]); in vm_get_mem_region()
274 static __always_inline void static_assert_is_vm(struct kvm_vm *vm) { } in static_assert_is_vm() argument
276 #define __vm_ioctl(vm, cmd, arg) \ argument
278 static_assert_is_vm(vm); \
[all …]

12345678910>>...20