Home
last modified time | relevance | path

Searched full:vm (Results 1 – 25 of 1171) sorted by relevance

12345678910>>...47

/linux/drivers/virtio/
H A Dvirtio_mem.c285 static void virtio_mem_retry(struct virtio_mem *vm);
286 static int virtio_mem_create_resource(struct virtio_mem *vm);
287 static void virtio_mem_delete_resource(struct virtio_mem *vm);
293 static int register_virtio_mem_device(struct virtio_mem *vm) in register_virtio_mem_device() argument
302 list_add_rcu(&vm->next, &virtio_mem_devices); in register_virtio_mem_device()
312 static void unregister_virtio_mem_device(struct virtio_mem *vm) in unregister_virtio_mem_device() argument
316 list_del_rcu(&vm->next); in unregister_virtio_mem_device()
343 static unsigned long virtio_mem_phys_to_bb_id(struct virtio_mem *vm, in virtio_mem_phys_to_bb_id() argument
346 return addr / vm->bbm.bb_size; in virtio_mem_phys_to_bb_id()
352 static uint64_t virtio_mem_bb_id_to_phys(struct virtio_mem *vm, in virtio_mem_bb_id_to_phys() argument
361 virtio_mem_phys_to_sb_id(struct virtio_mem * vm,unsigned long addr) virtio_mem_phys_to_sb_id() argument
373 virtio_mem_bbm_set_bb_state(struct virtio_mem * vm,unsigned long bb_id,enum virtio_mem_bbm_bb_state state) virtio_mem_bbm_set_bb_state() argument
391 virtio_mem_bbm_get_bb_state(struct virtio_mem * vm,unsigned long bb_id) virtio_mem_bbm_get_bb_state() argument
400 virtio_mem_bbm_bb_states_prepare_next_bb(struct virtio_mem * vm) virtio_mem_bbm_bb_states_prepare_next_bb() argument
440 virtio_mem_sbm_set_mb_state(struct virtio_mem * vm,unsigned long mb_id,uint8_t state) virtio_mem_sbm_set_mb_state() argument
457 virtio_mem_sbm_get_mb_state(struct virtio_mem * vm,unsigned long mb_id) virtio_mem_sbm_get_mb_state() argument
468 virtio_mem_sbm_mb_states_prepare_next_mb(struct virtio_mem * vm) virtio_mem_sbm_mb_states_prepare_next_mb() argument
507 virtio_mem_sbm_sb_state_bit_nr(struct virtio_mem * vm,unsigned long mb_id,int sb_id) virtio_mem_sbm_sb_state_bit_nr() argument
518 virtio_mem_sbm_set_sb_plugged(struct virtio_mem * vm,unsigned long mb_id,int sb_id,int count) virtio_mem_sbm_set_sb_plugged() argument
532 virtio_mem_sbm_set_sb_unplugged(struct virtio_mem * vm,unsigned long mb_id,int sb_id,int count) virtio_mem_sbm_set_sb_unplugged() argument
544 virtio_mem_sbm_test_sb_plugged(struct virtio_mem * vm,unsigned long mb_id,int sb_id,int count) virtio_mem_sbm_test_sb_plugged() argument
561 virtio_mem_sbm_test_sb_unplugged(struct virtio_mem * vm,unsigned long mb_id,int sb_id,int count) virtio_mem_sbm_test_sb_unplugged() argument
576 virtio_mem_sbm_first_unplugged_sb(struct virtio_mem * vm,unsigned long mb_id) virtio_mem_sbm_first_unplugged_sb() argument
588 virtio_mem_sbm_sb_states_prepare_next_mb(struct virtio_mem * vm) virtio_mem_sbm_sb_states_prepare_next_mb() argument
620 virtio_mem_could_add_memory(struct virtio_mem * vm,uint64_t size) virtio_mem_could_add_memory() argument
636 virtio_mem_add_memory(struct virtio_mem * vm,uint64_t addr,uint64_t size) virtio_mem_add_memory() argument
672 virtio_mem_sbm_add_mb(struct virtio_mem * vm,unsigned long mb_id) virtio_mem_sbm_add_mb() argument
683 virtio_mem_bbm_add_bb(struct virtio_mem * vm,unsigned long bb_id) virtio_mem_bbm_add_bb() argument
700 virtio_mem_remove_memory(struct virtio_mem * vm,uint64_t addr,uint64_t size) virtio_mem_remove_memory() argument
724 virtio_mem_sbm_remove_mb(struct virtio_mem * vm,unsigned long mb_id) virtio_mem_sbm_remove_mb() argument
740 virtio_mem_offline_and_remove_memory(struct virtio_mem * vm,uint64_t addr,uint64_t size) virtio_mem_offline_and_remove_memory() argument
773 virtio_mem_sbm_offline_and_remove_mb(struct virtio_mem * vm,unsigned long mb_id) virtio_mem_sbm_offline_and_remove_mb() argument
788 virtio_mem_sbm_try_remove_unplugged_mb(struct virtio_mem * vm,unsigned long mb_id) virtio_mem_sbm_try_remove_unplugged_mb() argument
814 virtio_mem_bbm_offline_and_remove_bb(struct virtio_mem * vm,unsigned long bb_id) virtio_mem_bbm_offline_and_remove_bb() argument
826 virtio_mem_retry(struct virtio_mem * vm) virtio_mem_retry() argument
836 virtio_mem_translate_node_id(struct virtio_mem * vm,uint16_t node_id) virtio_mem_translate_node_id() argument
851 virtio_mem_overlaps_range(struct virtio_mem * vm,uint64_t start,uint64_t size) virtio_mem_overlaps_range() argument
861 virtio_mem_contains_range(struct virtio_mem * vm,uint64_t start,uint64_t size) virtio_mem_contains_range() argument
867 virtio_mem_sbm_notify_going_online(struct virtio_mem * vm,unsigned long mb_id) virtio_mem_sbm_notify_going_online() argument
882 virtio_mem_sbm_notify_offline(struct virtio_mem * vm,unsigned long mb_id) virtio_mem_sbm_notify_offline() argument
902 virtio_mem_sbm_notify_online(struct virtio_mem * vm,unsigned long mb_id,unsigned long start_pfn) virtio_mem_sbm_notify_online() argument
927 virtio_mem_sbm_notify_going_offline(struct virtio_mem * vm,unsigned long mb_id) virtio_mem_sbm_notify_going_offline() argument
943 virtio_mem_sbm_notify_cancel_offline(struct virtio_mem * vm,unsigned long mb_id) virtio_mem_sbm_notify_cancel_offline() argument
959 virtio_mem_bbm_notify_going_offline(struct virtio_mem * vm,unsigned long bb_id,unsigned long pfn,unsigned long nr_pages) virtio_mem_bbm_notify_going_offline() argument
974 virtio_mem_bbm_notify_cancel_offline(struct virtio_mem * vm,unsigned long bb_id,unsigned long pfn,unsigned long nr_pages) virtio_mem_bbm_notify_cancel_offline() argument
993 struct virtio_mem *vm = container_of(nb, struct virtio_mem, virtio_mem_memory_notifier_cb() local
1124 struct virtio_mem *vm = container_of(nb, struct virtio_mem, virtio_mem_pm_notifier_cb() local
1224 virtio_mem_fake_offline(struct virtio_mem * vm,unsigned long pfn,unsigned long nr_pages) virtio_mem_fake_offline() argument
1299 virtio_mem_online_page(struct virtio_mem * vm,struct page * page,unsigned int order) virtio_mem_online_page() argument
1361 struct virtio_mem *vm; virtio_mem_online_page_cb() local
1389 virtio_mem_send_request(struct virtio_mem * vm,const struct virtio_mem_req * req) virtio_mem_send_request() argument
1419 virtio_mem_send_plug_request(struct virtio_mem * vm,uint64_t addr,uint64_t size) virtio_mem_send_plug_request() argument
1457 virtio_mem_send_unplug_request(struct virtio_mem * vm,uint64_t addr,uint64_t size) virtio_mem_send_unplug_request() argument
1492 virtio_mem_send_unplug_all_request(struct virtio_mem * vm) virtio_mem_send_unplug_all_request() argument
1523 virtio_mem_sbm_plug_sb(struct virtio_mem * vm,unsigned long mb_id,int sb_id,int count) virtio_mem_sbm_plug_sb() argument
1541 virtio_mem_sbm_unplug_sb(struct virtio_mem * vm,unsigned long mb_id,int sb_id,int count) virtio_mem_sbm_unplug_sb() argument
1560 virtio_mem_bbm_unplug_bb(struct virtio_mem * vm,unsigned long bb_id) virtio_mem_bbm_unplug_bb() argument
1573 virtio_mem_bbm_plug_bb(struct virtio_mem * vm,unsigned long bb_id) virtio_mem_bbm_plug_bb() argument
1590 virtio_mem_sbm_unplug_any_sb_raw(struct virtio_mem * vm,unsigned long mb_id,uint64_t * nb_sb) virtio_mem_sbm_unplug_any_sb_raw() argument
1629 virtio_mem_sbm_unplug_mb(struct virtio_mem * vm,unsigned long mb_id) virtio_mem_sbm_unplug_mb() argument
1639 virtio_mem_sbm_prepare_next_mb(struct virtio_mem * vm,unsigned long * mb_id) virtio_mem_sbm_prepare_next_mb() argument
1668 virtio_mem_sbm_plug_and_add_mb(struct virtio_mem * vm,unsigned long mb_id,uint64_t * nb_sb) virtio_mem_sbm_plug_and_add_mb() argument
1719 virtio_mem_sbm_plug_any_sb(struct virtio_mem * vm,unsigned long mb_id,uint64_t * nb_sb) virtio_mem_sbm_plug_any_sb() argument
1760 virtio_mem_sbm_plug_request(struct virtio_mem * vm,uint64_t diff) virtio_mem_sbm_plug_request() argument
1828 virtio_mem_bbm_plug_and_add_bb(struct virtio_mem * vm,unsigned long bb_id) virtio_mem_bbm_plug_and_add_bb() argument
1859 virtio_mem_bbm_prepare_next_bb(struct virtio_mem * vm,unsigned long * bb_id) virtio_mem_bbm_prepare_next_bb() argument
1878 virtio_mem_bbm_plug_request(struct virtio_mem * vm,uint64_t diff) virtio_mem_bbm_plug_request() argument
1922 virtio_mem_plug_request(struct virtio_mem * vm,uint64_t diff) virtio_mem_plug_request() argument
1938 virtio_mem_sbm_unplug_any_sb_offline(struct virtio_mem * vm,unsigned long mb_id,uint64_t * nb_sb) virtio_mem_sbm_unplug_any_sb_offline() argument
1976 virtio_mem_sbm_unplug_sb_online(struct virtio_mem * vm,unsigned long mb_id,int sb_id,int count) virtio_mem_sbm_unplug_sb_online() argument
2024 virtio_mem_sbm_unplug_any_sb_online(struct virtio_mem * vm,unsigned long mb_id,uint64_t * nb_sb) virtio_mem_sbm_unplug_any_sb_online() argument
2079 virtio_mem_sbm_unplug_any_sb(struct virtio_mem * vm,unsigned long mb_id,uint64_t * nb_sb) virtio_mem_sbm_unplug_any_sb() argument
2098 virtio_mem_sbm_unplug_request(struct virtio_mem * vm,uint64_t diff) virtio_mem_sbm_unplug_request() argument
2158 virtio_mem_bbm_offline_remove_and_unplug_bb(struct virtio_mem * vm,unsigned long bb_id) virtio_mem_bbm_offline_remove_and_unplug_bb() argument
2224 virtio_mem_bbm_bb_is_offline(struct virtio_mem * vm,unsigned long bb_id) virtio_mem_bbm_bb_is_offline() argument
2243 virtio_mem_bbm_bb_is_movable(struct virtio_mem * vm,unsigned long bb_id) virtio_mem_bbm_bb_is_movable() argument
2263 virtio_mem_bbm_unplug_request(struct virtio_mem * vm,uint64_t diff) virtio_mem_bbm_unplug_request() argument
2306 virtio_mem_unplug_request(struct virtio_mem * vm,uint64_t diff) virtio_mem_unplug_request() argument
2318 virtio_mem_cleanup_pending_mb(struct virtio_mem * vm) virtio_mem_cleanup_pending_mb() argument
2370 virtio_mem_refresh_config(struct virtio_mem * vm) virtio_mem_refresh_config() argument
2417 struct virtio_mem *vm = container_of(work, struct virtio_mem, wq); virtio_mem_run_wq() local
2506 struct virtio_mem *vm = container_of(timer, struct virtio_mem, virtio_mem_timer_expired() local
2517 struct virtio_mem *vm = vq->vdev->priv; virtio_mem_handle_response() local
2522 virtio_mem_init_vq(struct virtio_mem * vm) virtio_mem_init_vq() argument
2535 virtio_mem_init_hotplug(struct virtio_mem * vm) virtio_mem_init_hotplug() argument
2667 virtio_mem_send_state_request(struct virtio_mem * vm,uint64_t addr,uint64_t size) virtio_mem_send_state_request() argument
2698 struct virtio_mem *vm = container_of(cb, struct virtio_mem, virtio_mem_vmcore_pfn_is_ram() local
2733 virtio_mem_vmcore_add_device_ram(struct virtio_mem * vm,struct list_head * list,uint64_t start,uint64_t end) virtio_mem_vmcore_add_device_ram() argument
2748 struct virtio_mem *vm = container_of(cb, struct virtio_mem, virtio_mem_vmcore_get_device_ram() local
2818 virtio_mem_init_kdump(struct virtio_mem * vm) virtio_mem_init_kdump() argument
2836 virtio_mem_init(struct virtio_mem * vm) virtio_mem_init() argument
2879 virtio_mem_create_resource(struct virtio_mem * vm) virtio_mem_create_resource() argument
2907 virtio_mem_delete_resource(struct virtio_mem * vm) virtio_mem_delete_resource() argument
2926 virtio_mem_has_memory_added(struct virtio_mem * vm) virtio_mem_has_memory_added() argument
2937 struct virtio_mem *vm; virtio_mem_probe() local
2984 virtio_mem_deinit_hotplug(struct virtio_mem * vm) virtio_mem_deinit_hotplug() argument
3050 virtio_mem_deinit_kdump(struct virtio_mem * vm) virtio_mem_deinit_kdump() argument
3059 struct virtio_mem *vm = vdev->priv; virtio_mem_remove() local
3076 struct virtio_mem *vm = vdev->priv; virtio_mem_config_changed() local
3088 struct virtio_mem *vm = vdev->priv; virtio_mem_freeze() local
3111 struct virtio_mem *vm = vdev->priv; virtio_mem_restore() local
[all...]
/linux/tools/testing/selftests/kvm/lib/arm64/
H A Dprocessor.c24 static u64 pgd_index(struct kvm_vm *vm, gva_t gva) in pgd_index() argument
26 unsigned int shift = (vm->mmu.pgtable_levels - 1) * (vm->page_shift - 3) + vm->page_shift; in pgd_index()
27 u64 mask = (1UL << (vm->va_bits - shift)) - 1; in pgd_index()
32 static u64 pud_index(struct kvm_vm *vm, gva_t gva) in pud_index() argument
34 unsigned int shift = 2 * (vm->page_shift - 3) + vm->page_shift; in pud_index()
35 u64 mask = (1UL << (vm->page_shift - 3)) - 1; in pud_index()
37 TEST_ASSERT(vm->mmu.pgtable_levels == 4, in pud_index()
38 "Mode %d does not have 4 page table levels", vm->mode); in pud_index()
43 static u64 pmd_index(struct kvm_vm *vm, gva_t gva) in pmd_index() argument
45 unsigned int shift = (vm->page_shift - 3) + vm->page_shift; in pmd_index()
[all …]
/linux/drivers/gpu/drm/amd/amdgpu/
H A Damdgpu_vm.c120 * @vm: pointer to the amdgpu_vm structure to set the fence sequence on
122 struct amdgpu_vm *vm; member
131 * amdgpu_vm_assert_locked - check if VM is correctly locked
132 * @vm: the VM which schould be tested
134 * Asserts that the VM root PD is locked.
136 static void amdgpu_vm_assert_locked(struct amdgpu_vm *vm) in amdgpu_vm_assert_locked() argument
138 dma_resv_assert_held(vm->root.bo->tbo.base.resv); in amdgpu_vm_assert_locked()
156 struct amdgpu_vm *vm = vm_bo->vm;
150 amdgpu_vm_is_bo_always_valid(struct amdgpu_vm * vm,struct amdgpu_bo * bo) amdgpu_vm_is_bo_always_valid() argument
165 struct amdgpu_vm *vm = vm_bo->vm; amdgpu_vm_bo_evicted() local
284 amdgpu_vm_bo_reset_state_machine(struct amdgpu_vm * vm) amdgpu_vm_bo_reset_state_machine() argument
317 struct amdgpu_vm *vm = base->vm; amdgpu_vm_update_shared() local
367 struct amdgpu_vm *vm = base->vm; amdgpu_vm_update_stats_locked() local
406 struct amdgpu_vm *vm = base->vm; amdgpu_vm_update_stats() local
424 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
473 amdgpu_vm_lock_pd(struct amdgpu_vm * vm,struct drm_exec * exec,unsigned int num_fences) amdgpu_vm_lock_pd() argument
489 amdgpu_vm_lock_done_list(struct amdgpu_vm * vm,struct drm_exec * exec,unsigned int num_fences) amdgpu_vm_lock_done_list() argument
531 amdgpu_vm_move_to_lru_tail(struct amdgpu_device * adev,struct amdgpu_vm * vm) amdgpu_vm_move_to_lru_tail() argument
540 amdgpu_vm_init_entities(struct amdgpu_device * adev,struct amdgpu_vm * vm) amdgpu_vm_init_entities() argument
560 amdgpu_vm_fini_entities(struct amdgpu_vm * vm) amdgpu_vm_fini_entities() argument
575 amdgpu_vm_generation(struct amdgpu_device * adev,struct amdgpu_vm * vm) amdgpu_vm_generation() argument
606 amdgpu_vm_validate(struct amdgpu_device * adev,struct amdgpu_vm * vm,struct ww_acquire_ctx * ticket,int (* validate)(void * p,struct amdgpu_bo * bo),void * param) amdgpu_vm_validate() argument
682 amdgpu_vm_ready(struct amdgpu_vm * vm) amdgpu_vm_ready() argument
931 amdgpu_vm_bo_find(struct amdgpu_vm * vm,struct amdgpu_bo * bo) amdgpu_vm_bo_find() argument
985 amdgpu_vm_update_pdes(struct amdgpu_device * adev,struct amdgpu_vm * vm,bool immediate) amdgpu_vm_update_pdes() argument
1073 struct amdgpu_vm *vm = params->vm; amdgpu_vm_tlb_flush() local
1126 amdgpu_vm_update_range(struct amdgpu_device * adev,struct amdgpu_vm * vm,bool immediate,bool unlocked,bool flush_tlb,bool allow_override,struct amdgpu_sync * sync,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
1260 amdgpu_vm_get_memory(struct amdgpu_vm * vm,struct amdgpu_mem_stats stats[__AMDGPU_PL_NUM]) amdgpu_vm_get_memory() argument
1284 struct amdgpu_vm *vm = bo_va->base.vm; amdgpu_vm_bo_update() local
1521 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
1538 amdgpu_vm_prt_fini(struct amdgpu_device * adev,struct amdgpu_vm * vm) amdgpu_vm_prt_fini() argument
1567 amdgpu_vm_clear_freed(struct amdgpu_device * adev,struct amdgpu_vm * vm,struct dma_fence ** fence) amdgpu_vm_clear_freed() argument
1629 amdgpu_vm_handle_moved(struct amdgpu_device * adev,struct amdgpu_vm * vm,struct ww_acquire_ctx * ticket) amdgpu_vm_handle_moved() argument
1710 amdgpu_vm_flush_compute_tlb(struct amdgpu_device * adev,struct amdgpu_vm * vm,uint32_t flush_type,uint32_t xcc_mask) amdgpu_vm_flush_compute_tlb() argument
1757 amdgpu_vm_bo_add(struct amdgpu_device * adev,struct amdgpu_vm * vm,struct amdgpu_bo * bo) amdgpu_vm_bo_add() argument
1802 struct amdgpu_vm *vm = bo_va->base.vm; amdgpu_vm_bo_insert_map() local
1873 struct amdgpu_vm *vm = bo_va->base.vm; amdgpu_vm_bo_map() local
1982 struct amdgpu_vm *vm = bo_va->base.vm; amdgpu_vm_bo_unmap() local
2039 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
2157 amdgpu_vm_bo_lookup_mapping(struct amdgpu_vm * vm,uint64_t addr) amdgpu_vm_bo_lookup_mapping() argument
2171 amdgpu_vm_bo_trace_cs(struct amdgpu_vm * vm,struct ww_acquire_ctx * ticket) amdgpu_vm_bo_trace_cs() argument
2208 struct amdgpu_vm *vm = bo_va->base.vm; amdgpu_vm_bo_del() local
2302 struct amdgpu_vm *vm = bo_base->vm; amdgpu_vm_bo_invalidate() local
2337 struct amdgpu_vm *vm = bo_base->vm; amdgpu_vm_bo_move() local
2474 amdgpu_vm_wait_idle(struct amdgpu_vm * vm,long timeout) amdgpu_vm_wait_idle() argument
2493 struct amdgpu_vm *vm; amdgpu_vm_get_vm_from_pasid() local
2525 amdgpu_vm_get_task_info_vm(struct amdgpu_vm * vm) amdgpu_vm_get_task_info_vm() argument
2553 amdgpu_vm_create_task_info(struct amdgpu_vm * vm) amdgpu_vm_create_task_info() argument
2568 amdgpu_vm_set_task_info(struct amdgpu_vm * vm) amdgpu_vm_set_task_info() argument
2596 amdgpu_vm_init(struct amdgpu_device * adev,struct amdgpu_vm * vm,int32_t xcp_id,uint32_t pasid) amdgpu_vm_init() argument
2726 amdgpu_vm_make_compute(struct amdgpu_device * adev,struct amdgpu_vm * vm) amdgpu_vm_make_compute() argument
2769 amdgpu_vm_stats_is_zero(struct amdgpu_vm * vm) amdgpu_vm_stats_is_zero() argument
2788 amdgpu_vm_fini(struct amdgpu_device * adev,struct amdgpu_vm * vm) amdgpu_vm_fini() argument
2935 struct amdgpu_vm *vm = &fpriv->vm; amdgpu_vm_ioctl() local
2966 struct amdgpu_vm *vm; amdgpu_vm_lock_by_pasid() local
3020 struct amdgpu_vm *vm; amdgpu_vm_handle_fault() local
3100 amdgpu_debugfs_vm_bo_info(struct amdgpu_vm * vm,struct seq_file * m) amdgpu_debugfs_vm_bo_info() argument
3205 struct amdgpu_vm *vm; amdgpu_vm_update_fault_cache() local
[all...]
/linux/tools/testing/selftests/kvm/lib/x86/
H A Dsev.c17 static void encrypt_region(struct kvm_vm *vm, struct userspace_mem_region *region, in encrypt_region() argument
22 const sparsebit_idx_t lowest_page_in_region = gpa_base >> vm->page_shift; in encrypt_region()
28 if (!is_sev_snp_vm(vm)) in encrypt_region()
29 sev_register_encrypted_memory(vm, region); in encrypt_region()
32 const u64 size = (j - i + 1) * vm->page_size; in encrypt_region()
33 const u64 offset = (i - lowest_page_in_region) * vm->page_size; in encrypt_region()
36 vm_mem_set_private(vm, gpa_base + offset, size); in encrypt_region()
38 if (is_sev_snp_vm(vm)) in encrypt_region()
39 snp_launch_update_data(vm, gpa_base + offset, in encrypt_region()
40 (u64)addr_gpa2hva(vm, gpa_base + offset), in encrypt_region()
[all …]
/linux/tools/testing/selftests/kvm/lib/loongarch/
H A Dprocessor.c18 static u64 virt_pte_index(struct kvm_vm *vm, gva_t gva, int level) in virt_pte_index() argument
23 shift = level * (vm->page_shift - 3) + vm->page_shift; in virt_pte_index()
24 mask = (1UL << (vm->page_shift - 3)) - 1; in virt_pte_index()
28 static u64 pte_addr(struct kvm_vm *vm, u64 entry) in pte_addr() argument
30 return entry & ~((0x1UL << vm->page_shift) - 1); in pte_addr()
33 static u64 ptrs_per_pte(struct kvm_vm *vm) in ptrs_per_pte() argument
35 return 1 << (vm->page_shift - 3); in ptrs_per_pte()
38 static void virt_set_pgtable(struct kvm_vm *vm, gpa_t table, gpa_t child) in virt_set_pgtable() argument
43 ptep = addr_gpa2hva(vm, table); in virt_set_pgtable()
44 ptrs_per_pte = 1 << (vm->page_shift - 3); in virt_set_pgtable()
[all …]
/linux/drivers/gpu/drm/panthor/
H A Dpanthor_mmu.c50 /** @vm: VM bound to this slot. NULL is no VM is bound. */
51 struct panthor_vm *vm;
86 * We use this list to pick a VM to evict when all slots are
97 /** @vm: VMs management fields */
99 /** @vm.lock: Lock protecting access to list. */
102 /** @vm.list: List containing all VMs. */
105 /** @vm.reset_in_progress: True if a reset is in progress. */
108 /** @vm
48 struct panthor_vm *vm; global() member
104 } vm; global() member
403 struct panthor_vm *vm; global() member
435 struct panthor_vm *vm = cookie; alloc_pt() local
487 struct panthor_vm *vm = cookie; free_pt() local
590 struct panthor_vm *vm = ptdev->mmu->as.slots[as_nr].vm; panthor_mmu_as_disable() local
636 panthor_vm_has_unhandled_faults(struct panthor_vm * vm) panthor_vm_has_unhandled_faults() argument
647 panthor_vm_is_unusable(struct panthor_vm * vm) panthor_vm_is_unusable() argument
652 panthor_vm_release_as_locked(struct panthor_vm * vm) panthor_vm_release_as_locked() argument
676 panthor_vm_active(struct panthor_vm * vm) panthor_vm_active() argument
800 panthor_vm_idle(struct panthor_vm * vm) panthor_vm_idle() argument
814 panthor_vm_page_size(struct panthor_vm * vm) panthor_vm_page_size() argument
822 panthor_vm_stop(struct panthor_vm * vm) panthor_vm_stop() argument
827 panthor_vm_start(struct panthor_vm * vm) panthor_vm_start() argument
838 panthor_vm_as(struct panthor_vm * vm) panthor_vm_as() argument
864 panthor_vm_declare_unusable(struct panthor_vm * vm) panthor_vm_declare_unusable() argument
881 panthor_vm_unmap_pages(struct panthor_vm * vm,u64 iova,u64 size) panthor_vm_unmap_pages() argument
934 panthor_vm_map_pages(struct panthor_vm * vm,u64 iova,int prot,struct sg_table * sgt,u64 offset,u64 size) panthor_vm_map_pages() argument
1041 panthor_vm_alloc_va(struct panthor_vm * vm,u64 va,u64 size,struct drm_mm_node * va_node) panthor_vm_alloc_va() argument
1075 panthor_vm_free_va(struct panthor_vm * vm,struct drm_mm_node * va_node) panthor_vm_free_va() argument
1092 panthor_vm_cleanup_op_ctx(struct panthor_vm_op_ctx * op_ctx,struct panthor_vm * vm) panthor_vm_cleanup_op_ctx() argument
1190 panthor_vm_prepare_map_op_ctx(struct panthor_vm_op_ctx * op_ctx,struct panthor_vm * vm,struct panthor_gem_object * bo,u64 offset,u64 size,u64 va,u32 flags) panthor_vm_prepare_map_op_ctx() argument
1298 panthor_vm_prepare_unmap_op_ctx(struct panthor_vm_op_ctx * op_ctx,struct panthor_vm * vm,u64 va,u64 size) panthor_vm_prepare_unmap_op_ctx() argument
1348 panthor_vm_prepare_sync_only_op_ctx(struct panthor_vm_op_ctx * op_ctx,struct panthor_vm * vm) panthor_vm_prepare_sync_only_op_ctx() argument
1369 panthor_vm_get_bo_for_va(struct panthor_vm * vm,u64 va,u64 * bo_offset) panthor_vm_get_bo_for_va() argument
1474 struct panthor_vm *vm; panthor_vm_pool_create_vm() local
1499 panthor_vm_destroy(struct panthor_vm * vm) panthor_vm_destroy() argument
1538 struct panthor_vm *vm; panthor_vm_pool_destroy_vm() local
1557 struct panthor_vm *vm; panthor_vm_pool_get_vm() local
1577 struct panthor_vm *vm; panthor_vm_pool_destroy() local
1638 panthor_vm_lock_region(struct panthor_vm * vm,u64 start,u64 size) panthor_vm_lock_region() argument
1689 panthor_vm_unlock_region(struct panthor_vm * vm) panthor_vm_unlock_region() argument
1797 struct panthor_vm *vm = ptdev->mmu->as.slots[i].vm; panthor_mmu_suspend() local
1841 struct panthor_vm *vm; panthor_mmu_pre_reset() local
1861 struct panthor_vm *vm; panthor_mmu_post_reset() local
1872 struct panthor_vm *vm = ptdev->mmu->as.slots[i].vm; panthor_mmu_post_reset() local
1893 struct panthor_vm *vm = container_of(gpuvm, struct panthor_vm, base); panthor_vm_free() local
1943 panthor_vm_put(struct panthor_vm * vm) panthor_vm_put() argument
1954 panthor_vm_get(struct panthor_vm * vm) panthor_vm_get() argument
1976 panthor_vm_get_heap_pool(struct panthor_vm * vm,bool create) panthor_vm_get_heap_pool() argument
2010 struct panthor_vm *vm; panthor_vm_heaps_sizes() local
2068 panthor_vma_link(struct panthor_vm * vm,struct panthor_vma * vma,struct drm_gpuvm_bo * vm_bo) panthor_vma_link() argument
2098 struct panthor_vm *vm = priv; panthor_gpuva_sm_step_map() local
2171 struct panthor_vm *vm = priv; panthor_gpuva_sm_step_remap() local
2248 struct panthor_vm *vm = priv; panthor_gpuva_sm_step_unmap() local
2271 panthor_vm_resv(struct panthor_vm * vm) panthor_vm_resv() argument
2276 panthor_vm_root_gem(struct panthor_vm * vm) panthor_vm_root_gem() argument
2285 panthor_vm_exec_op(struct panthor_vm * vm,struct panthor_vm_op_ctx * op,bool flag_vm_unusable_on_failure) panthor_vm_exec_op() argument
2444 struct panthor_vm *vm; panthor_vm_create() local
2546 panthor_vm_bind_prepare_op_ctx(struct drm_file * file,struct panthor_vm * vm,const struct drm_panthor_vm_bind_op * op,struct panthor_vm_op_ctx * op_ctx) panthor_vm_bind_prepare_op_ctx() argument
2618 panthor_vm_bind_job_create(struct drm_file * file,struct panthor_vm * vm,const struct drm_panthor_vm_bind_op * op) panthor_vm_bind_job_create() argument
2704 panthor_vm_update_resvs(struct panthor_vm * vm,struct drm_exec * exec,struct dma_fence * fence,enum dma_resv_usage private_usage,enum dma_resv_usage extobj_usage) panthor_vm_update_resvs() argument
2721 panthor_vm_bind_exec_sync_op(struct drm_file * file,struct panthor_vm * vm,struct drm_panthor_vm_bind_op * op) panthor_vm_bind_exec_sync_op() argument
2759 panthor_vm_map_bo_range(struct panthor_vm * vm,struct panthor_gem_object * bo,u64 offset,u64 size,u64 va,u32 flags) panthor_vm_map_bo_range() argument
2786 panthor_vm_unmap_range(struct panthor_vm * vm,u64 va,u64 size) panthor_vm_unmap_range() argument
2814 panthor_vm_prepare_mapped_bos_resvs(struct drm_exec * exec,struct panthor_vm * vm,u32 slot_count) panthor_vm_prepare_mapped_bos_resvs() argument
2841 struct panthor_vm *vm = ptdev->mmu->as.slots[i].vm; panthor_mmu_unplug() local
2912 show_vm_gpuvas(struct panthor_vm * vm,struct seq_file * m) show_vm_gpuvas() argument
2929 struct panthor_vm *vm; show_each_vm() local
[all...]
/linux/drivers/gpu/drm/lima/
H A 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/drivers/gpu/drm/xe/
H A Dxe_vm.c46 static struct drm_gem_object *xe_vm_obj(struct xe_vm *vm) in xe_vm_obj() argument
48 return vm->gpuvm.r_obj; in xe_vm_obj()
52 * xe_vm_drm_exec_lock() - Lock the vm's resv with a drm_exec transaction
53 * @vm: The vm whose resv is to be locked.
56 * Helper to lock the vm's resv as part of a drm_exec transaction.
60 int xe_vm_drm_exec_lock(struct xe_vm *vm, struct drm_exec *exec) in xe_vm_drm_exec_lock() argument
62 return drm_exec_lock_obj(exec, xe_vm_obj(vm)); in xe_vm_drm_exec_lock()
65 static bool preempt_fences_waiting(struct xe_vm *vm) in preempt_fences_waiting() argument
69 lockdep_assert_held(&vm in preempt_fences_waiting()
91 alloc_preempt_fences(struct xe_vm * vm,struct list_head * list,unsigned int * count) alloc_preempt_fences() argument
112 wait_for_existing_preempt_fences(struct xe_vm * vm) wait_for_existing_preempt_fences() argument
144 xe_vm_is_idle(struct xe_vm * vm) xe_vm_is_idle() argument
157 arm_preempt_fences(struct xe_vm * vm,struct list_head * list) arm_preempt_fences() argument
176 add_preempt_fences(struct xe_vm * vm,struct xe_bo * bo) add_preempt_fences() argument
200 resume_and_reinstall_preempt_fences(struct xe_vm * vm,struct drm_exec * exec) resume_and_reinstall_preempt_fences() argument
216 xe_vm_add_compute_exec_queue(struct xe_vm * vm,struct xe_exec_queue * q) xe_vm_add_compute_exec_queue() argument
279 xe_vm_remove_compute_exec_queue(struct xe_vm * vm,struct xe_exec_queue * q) xe_vm_remove_compute_exec_queue() argument
307 xe_vm_kill(struct xe_vm * vm,bool unlocked) xe_vm_kill() argument
330 struct xe_vm *vm = gpuvm_to_vm(vm_bo->vm); xe_gpuvm_validate() local
372 xe_vm_validate_rebind(struct xe_vm * vm,struct drm_exec * exec,unsigned int num_fences) xe_vm_validate_rebind() argument
398 xe_preempt_work_begin(struct drm_exec * exec,struct xe_vm * vm,bool * done) xe_preempt_work_begin() argument
435 vm_suspend_rebind_worker(struct xe_vm * vm) vm_suspend_rebind_worker() argument
457 xe_vm_resume_rebind_worker(struct xe_vm * vm) xe_vm_resume_rebind_worker() argument
464 struct xe_vm *vm = container_of(w, struct xe_vm, preempt.rebind_work); preempt_rebind_work_func() local
599 xe_vm_add_fault_entry_pf(struct xe_vm * vm,struct xe_pagefault * pf) xe_vm_add_fault_entry_pf() argument
645 xe_vm_clear_fault_entries(struct xe_vm * vm) xe_vm_clear_fault_entries() argument
764 xe_vm_rebind(struct xe_vm * vm,bool rebind_worker) xe_vm_rebind() argument
819 xe_vma_rebind(struct xe_vm * vm,struct xe_vma * vma,u8 tile_mask) xe_vma_rebind() argument
906 xe_vm_range_rebind(struct xe_vm * vm,struct xe_vma * vma,struct xe_svm_range * range,u8 tile_mask) xe_vm_range_rebind() argument
990 xe_vm_range_unbind(struct xe_vm * vm,struct xe_svm_range * range) xe_vm_range_unbind() argument
1067 xe_vma_create(struct xe_vm * vm,struct xe_bo * bo,u64 bo_offset_or_userptr,u64 start,u64 end,struct xe_vma_mem_attr * attr,unsigned int flags) xe_vma_create() argument
1180 struct xe_vm *vm = xe_vma_vm(vma); xe_vma_destroy_late() local
1221 struct xe_vm *vm = xe_vma_vm(vma); xe_vma_destroy() local
1266 struct xe_vm *vm = xe_vma_vm(vma); xe_vm_lock_vma() local
1297 xe_vm_find_overlapping_vma(struct xe_vm * vm,u64 start,u64 range) xe_vm_find_overlapping_vma() argument
1313 xe_vm_insert_vma(struct xe_vm * vm,struct xe_vma * vma) xe_vm_insert_vma() argument
1328 xe_vm_remove_vma(struct xe_vm * vm,struct xe_vma * vma) xe_vm_remove_vma() argument
1468 struct xe_vm *vm = xe_vma_vm(vma); xelp_pte_encode_vma() local
1537 xe_vm_create_scratch(struct xe_device * xe,struct xe_tile * tile,struct xe_vm * vm,struct drm_exec * exec) xe_vm_create_scratch() argument
1557 xe_vm_free_scratch(struct xe_vm * vm) xe_vm_free_scratch() argument
1577 xe_vm_pt_destroy(struct xe_vm * vm) xe_vm_pt_destroy() argument
1592 xe_vm_init_prove_locking(struct xe_device * xe,struct xe_vm * vm) xe_vm_init_prove_locking() argument
1611 struct xe_vm *vm; xe_vm_create() local
1830 xe_vm_close(struct xe_vm * vm) xe_vm_close() argument
1872 xe_vm_close_and_put(struct xe_vm * vm) xe_vm_close_and_put() argument
1985 struct xe_vm *vm = vm_destroy_work_func() local
2017 struct xe_vm *vm = container_of(gpuvm, struct xe_vm, gpuvm); xe_vm_free() local
2025 struct xe_vm *vm; xe_vm_lookup() local
2036 xe_vm_pdp4_descriptor(struct xe_vm * vm,struct xe_tile * tile) xe_vm_pdp4_descriptor() argument
2042 to_wait_exec_queue(struct xe_vm * vm,struct xe_exec_queue * q) to_wait_exec_queue() argument
2074 struct xe_vm *vm; xe_vm_create_ioctl() local
2147 struct xe_vm *vm; xe_vm_destroy_ioctl() local
2170 xe_vm_query_vmas(struct xe_vm * vm,u64 start,u64 end) xe_vm_query_vmas() argument
2182 get_mem_attrs(struct xe_vm * vm,u32 * num_vmas,u64 start,u64 end,struct drm_xe_mem_range_attr * attrs) get_mem_attrs() argument
2218 struct xe_vm *vm; xe_vm_query_vmas_attrs_ioctl() local
2289 xe_vm_find_vma_by_addr(struct xe_vm * vm,u64 page_addr) xe_vm_find_vma_by_addr() argument
2309 prep_vma_destroy(struct xe_vm * vm,struct xe_vma * vma,bool post_commit) prep_vma_destroy() argument
2369 __xe_vm_needs_clear_scratch_pages(struct xe_vm * vm,u32 bind_flags) __xe_vm_needs_clear_scratch_pages() argument
2399 vm_bind_ioctl_ops_create(struct xe_vm * vm,struct xe_vma_ops * vops,struct xe_bo * bo,u64 bo_offset_or_userptr,u64 addr,u64 range,u32 operation,u32 flags,u32 prefetch_region,u16 pat_index) vm_bind_ioctl_ops_create() argument
2577 new_vma(struct xe_vm * vm,struct drm_gpuva_op_map * op,struct xe_vma_mem_attr * attr,unsigned int flags) new_vma() argument
2679 xe_vma_op_commit(struct xe_vm * vm,struct xe_vma_op * op) xe_vma_op_commit() argument
2766 vm_bind_ioctl_ops_parse(struct xe_vm * vm,struct drm_gpuva_ops * ops,struct xe_vma_ops * vops) vm_bind_ioctl_ops_parse() argument
2950 xe_vma_op_unwind(struct xe_vm * vm,struct xe_vma_op * op,bool post_commit,bool prev_post_commit,bool next_post_commit) xe_vma_op_unwind() argument
3016 vm_bind_ioctl_ops_unwind(struct xe_vm * vm,struct drm_gpuva_ops ** ops,int num_ops_list) vm_bind_ioctl_ops_unwind() argument
3058 struct xe_vm *vm = xe_vma_vm(vma); vma_lock_and_validate() local
3108 prefetch_ranges(struct xe_vm * vm,struct xe_vma_op * op) prefetch_ranges() argument
3163 op_lock_and_prep(struct drm_exec * exec,struct xe_vm * vm,struct xe_vma_ops * vops,struct xe_vma_op * op) op_lock_and_prep() argument
3273 vm_bind_ioctl_ops_prefetch_ranges(struct xe_vm * vm,struct xe_vma_ops * vops) vm_bind_ioctl_ops_prefetch_ranges() argument
3293 vm_bind_ioctl_ops_lock_and_prep(struct drm_exec * exec,struct xe_vm * vm,struct xe_vma_ops * vops) vm_bind_ioctl_ops_lock_and_prep() argument
3352 vm_ops_setup_tile_args(struct xe_vm * vm,struct xe_vma_ops * vops) vm_ops_setup_tile_args() argument
3378 ops_execute(struct xe_vm * vm,struct xe_vma_ops * vops) ops_execute() argument
3486 op_add_ufence(struct xe_vm * vm,struct xe_vma_op * op,struct xe_user_fence * ufence) op_add_ufence() argument
3510 vm_bind_ioctl_ops_fini(struct xe_vm * vm,struct xe_vma_ops * vops,struct dma_fence * fence) vm_bind_ioctl_ops_fini() argument
3536 vm_bind_ioctl_ops_execute(struct xe_vm * vm,struct xe_vma_ops * vops) vm_bind_ioctl_ops_execute() argument
3592 vm_bind_ioctl_check_args(struct xe_device * xe,struct xe_vm * vm,struct drm_xe_vm_bind * args,struct drm_xe_vm_bind_op ** bind_ops) vm_bind_ioctl_check_args() argument
3746 vm_bind_ioctl_signal_fences(struct xe_vm * vm,struct xe_exec_queue * q,struct xe_sync_entry * syncs,int num_syncs) vm_bind_ioctl_signal_fences() argument
3769 xe_vma_ops_init(struct xe_vma_ops * vops,struct xe_vm * vm,struct xe_exec_queue * q,struct xe_sync_entry * syncs,u32 num_syncs) xe_vma_ops_init() argument
3862 struct xe_vm *vm; xe_vm_bind_ioctl() local
4112 fill_faults(struct xe_vm * vm,struct drm_xe_vm_get_property * args) fill_faults() argument
4151 xe_vm_get_property_helper(struct xe_vm * vm,struct drm_xe_vm_get_property * args) xe_vm_get_property_helper() argument
4190 struct xe_vm *vm; xe_vm_get_property_ioctl() local
4222 xe_vm_bind_kernel_bo(struct xe_vm * vm,struct xe_bo * bo,struct xe_exec_queue * q,u64 addr,enum xe_cache_level cache_lvl) xe_vm_bind_kernel_bo() argument
4292 xe_vm_lock(struct xe_vm * vm,bool intr) xe_vm_lock() argument
4310 xe_vm_unlock(struct xe_vm * vm) xe_vm_unlock() argument
4332 struct xe_vm *vm = xe_vma_vm(vma); xe_vm_invalidate_vma_submit() local
4405 xe_vm_validate_protected(struct xe_vm * vm) xe_vm_validate_protected() argument
4453 xe_vm_snapshot_capture(struct xe_vm * vm) xe_vm_snapshot_capture() argument
4697 xe_vm_alloc_vma(struct xe_vm * vm,struct drm_gpuvm_map_req * map_req,bool is_madvise) xe_vm_alloc_vma() argument
4837 xe_vm_alloc_madvise_vma(struct xe_vm * vm,uint64_t start,uint64_t range) xe_vm_alloc_madvise_vma() argument
4872 xe_vm_find_cpu_addr_mirror_vma_range(struct xe_vm * vm,u64 * start,u64 * end) xe_vm_find_cpu_addr_mirror_vma_range() argument
4901 xe_vm_alloc_cpu_addr_mirror_vma(struct xe_vm * vm,uint64_t start,uint64_t range) xe_vm_alloc_cpu_addr_mirror_vma() argument
4924 xe_vm_add_exec_queue(struct xe_vm * vm,struct xe_exec_queue * q) xe_vm_add_exec_queue() argument
4953 xe_vm_remove_exec_queue(struct xe_vm * vm,struct xe_exec_queue * q) xe_vm_remove_exec_queue() argument
[all...]
/linux/drivers/virt/acrn/
H A Dvm.c21 * is wrote in VM creation ioctl. Use the rwlock mechanism to protect it.
25 struct acrn_vm *acrn_vm_create(struct acrn_vm *vm, in acrn_vm_create() argument
33 "Failed to create VM! Error: %d\n", ret); in acrn_vm_create()
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()
[all …]
H A Dirqfd.c24 * @vm: Associated VM pointer
28 * @list: Entry within &acrn_vm.irqfds of irqfds of a VM
34 struct acrn_vm *vm;
46 struct acrn_vm *vm = irqfd->vm;
48 acrn_msi_inject(vm, irqfd->msi.msi_addr, in hsm_irqfd_shutdown()
56 queue_work(irqfd->vm->irqfd_wq, &irqfd->shutdown); in hsm_irqfd_shutdown()
64 struct acrn_vm *vm = irqfd->vm; in hsm_irqfd_shutdown_work()
30 struct acrn_vm *vm; global() member
41 struct acrn_vm *vm = irqfd->vm; acrn_irqfd_inject() local
63 struct acrn_vm *vm; hsm_irqfd_shutdown_work() local
79 struct acrn_vm *vm; hsm_irqfd_wakeup() local
108 acrn_irqfd_assign(struct acrn_vm * vm,struct acrn_irqfd * args) acrn_irqfd_assign() argument
170 acrn_irqfd_deassign(struct acrn_vm * vm,struct acrn_irqfd * args) acrn_irqfd_deassign() argument
193 acrn_irqfd_config(struct acrn_vm * vm,struct acrn_irqfd * args) acrn_irqfd_config() argument
205 acrn_irqfd_init(struct acrn_vm * vm) acrn_irqfd_init() argument
217 acrn_irqfd_deinit(struct acrn_vm * vm) acrn_irqfd_deinit() argument
[all...]
H A Dacrn_drv.h28 * @user_vm_pa: Physical address of User VM to be mapped.
29 * @service_vm_pa: Physical address of Service VM to be mapped.
33 * to manage the EPT mappings of a single memory region of the User VM. Several
47 * @vmid: A User VM ID.
54 * multiple memory regions of a User VM. A &struct vm_memory_region_batch
67 * struct vm_memory_mapping - Memory map between a User VM and the Service VM
68 * @pages: Pages in Service VM kernel.
70 * @service_vm_va: Virtual address in Service VM kernel.
71 * @user_vm_pa: Physical address in User VM.
74 * HSM maintains memory mappings between a User VM GPA and the Service VM
[all …]
H A Dmm.c19 static int modify_region(struct acrn_vm *vm, struct vm_memory_region_op *region) in modify_region() argument
28 regions->vmid = vm->vmid; in modify_region()
35 "Failed to set memory region for VM[%u]!\n", vm->vmid); in modify_region()
43 * @vm: User VM.
44 * @user_gpa: A GPA of User VM.
45 * @service_gpa: A GPA of Service VM.
52 int acrn_mm_region_add(struct acrn_vm *vm, u64 user_gpa, u64 service_gpa, in acrn_mm_region_add() argument
68 ret = modify_region(vm, region); in acrn_mm_region_add()
79 * @vm: User VM.
80 * @user_gpa: A GPA of the User VM.
[all …]
H A Dioeventfd.c19 * @list: Entry within &acrn_vm.ioeventfds of ioeventfds of a VM
43 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()
72 * Assign an eventfd to a VM and create a HSM ioeventfd associated with the
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()
[all …]
H A Dhypercall.h53 * hcall_sos_remove_cpu() - Remove a vCPU of Service VM
64 * hcall_create_vm() - Create a User VM
65 * @vminfo: Service VM GPA of info of User VM creation
75 * hcall_start_vm() - Start a User VM
76 * @vmid: User VM ID
86 * hcall_pause_vm() - Pause a User VM
87 * @vmid: User VM ID
97 * hcall_destroy_vm() - Destroy a User VM
98 * @vmid: User VM ID
108 * hcall_reset_vm() - Reset a User VM
[all …]
/linux/tools/testing/selftests/kvm/include/
H A Dkvm_util.h63 struct kvm_vm *vm; member
160 #define kvm_for_each_vcpu(vm, i, vcpu) \ argument
161 for ((i) = 0; (i) <= (vm)->last_vcpu_id; (i)++) \
162 if (!((vcpu) = vm->vcpus[i])) \
167 memslot2region(struct kvm_vm *vm, u32 memslot);
169 static inline struct userspace_mem_region *vm_get_mem_region(struct kvm_vm *vm, in vm_get_mem_region() argument
173 return memslot2region(vm, vm->memslots[type]); in vm_get_mem_region()
336 static __always_inline void static_assert_is_vm(struct kvm_vm *vm) { } in static_assert_is_vm() argument
338 #define __vm_ioctl(vm, cm argument
352 __TEST_ASSERT_VM_VCPU_IOCTL(cond,name,ret,vm) global() argument
370 TEST_ASSERT_VM_VCPU_IOCTL(cond,cmd,ret,vm) global() argument
373 vm_ioctl(vm,cmd,arg) global() argument
399 vm_check_cap(struct kvm_vm * vm,long cap) vm_check_cap() argument
407 __vm_enable_cap(struct kvm_vm * vm,u32 cap,u64 arg0) __vm_enable_cap() argument
414 vm_enable_cap(struct kvm_vm * vm,u32 cap,u64 arg0) vm_enable_cap() argument
421 vm_set_memory_attributes(struct kvm_vm * vm,gpa_t gpa,u64 size,u64 attributes) vm_set_memory_attributes() argument
442 vm_mem_set_private(struct kvm_vm * vm,gpa_t gpa,u64 size) vm_mem_set_private() argument
448 vm_mem_set_shared(struct kvm_vm * vm,gpa_t gpa,u64 size) vm_mem_set_shared() argument
457 vm_guest_mem_punch_hole(struct kvm_vm * vm,gpa_t gpa,u64 size) vm_guest_mem_punch_hole() argument
463 vm_guest_mem_allocate(struct kvm_vm * vm,gpa_t gpa,u64 size) vm_guest_mem_allocate() argument
480 kvm_vm_get_dirty_log(struct kvm_vm * vm,int slot,void * log) kvm_vm_get_dirty_log() argument
487 kvm_vm_clear_dirty_log(struct kvm_vm * vm,int slot,void * log,u64 first_page,u32 num_pages) kvm_vm_clear_dirty_log() argument
500 kvm_vm_reset_dirty_ring(struct kvm_vm * vm) kvm_vm_reset_dirty_ring() argument
505 kvm_vm_register_coalesced_io(struct kvm_vm * vm,u64 address,u64 size,bool pio) kvm_vm_register_coalesced_io() argument
518 kvm_vm_unregister_coalesced_io(struct kvm_vm * vm,u64 address,u64 size,bool pio) kvm_vm_unregister_coalesced_io() argument
531 vm_get_stats_fd(struct kvm_vm * vm) vm_get_stats_fd() argument
539 __kvm_irqfd(struct kvm_vm * vm,u32 gsi,int eventfd,u32 flags) __kvm_irqfd() argument
552 kvm_irqfd(struct kvm_vm * vm,u32 gsi,int eventfd,u32 flags) kvm_irqfd() argument
559 kvm_assign_irqfd(struct kvm_vm * vm,u32 gsi,int eventfd) kvm_assign_irqfd() argument
564 kvm_deassign_irqfd(struct kvm_vm * vm,u32 gsi,int eventfd) kvm_deassign_irqfd() argument
627 vm_get_stat(vm,stat) global() argument
667 __vm_create_guest_memfd(struct kvm_vm * vm,u64 size,u64 flags) __vm_create_guest_memfd() argument
678 vm_create_guest_memfd(struct kvm_vm * vm,u64 size,u64 flags) vm_create_guest_memfd() argument
706 vm_arch_has_protected_memory(struct kvm_vm * vm) vm_arch_has_protected_memory() argument
739 vm_untag_gpa(struct kvm_vm * vm,gpa_t gpa) vm_untag_gpa() argument
951 kvm_create_device(struct kvm_vm * vm,u64 type) kvm_create_device() argument
998 vm_phy_pages_alloc(struct kvm_vm * vm,size_t num,gpa_t min_gpa,u32 memslot) vm_phy_pages_alloc() argument
1131 sync_global_to_guest(vm,g) global() argument
1136 sync_global_from_guest(vm,g) global() argument
1147 write_guest_global(vm,g,val) global() argument
1175 vm_vcpu_add(struct kvm_vm * vm,u32 vcpu_id,void * guest_code) vm_vcpu_add() argument
1188 vm_vcpu_recreate(struct kvm_vm * vm,u32 vcpu_id) vm_vcpu_recreate() argument
1198 virt_pgd_alloc(struct kvm_vm * vm) virt_pgd_alloc() argument
1209 virt_pg_map(struct kvm_vm * vm,gva_t gva,gpa_t gpa) virt_pg_map() argument
1233 addr_gva2gpa(struct kvm_vm * vm,gva_t gva) addr_gva2gpa() argument
1255 virt_dump(FILE * stream,struct kvm_vm * vm,u8 indent) virt_dump() argument
1261 __vm_disable_nx_huge_pages(struct kvm_vm * vm) __vm_disable_nx_huge_pages() argument
1266 vm_page_align(struct kvm_vm * vm,u64 v) vm_page_align() argument
[all...]
/linux/tools/testing/selftests/kvm/lib/
H A Dkvm_util.c168 void vm_enable_dirty_ring(struct kvm_vm *vm, u32 ring_size) in vm_enable_dirty_ring() argument
170 if (vm_check_cap(vm, KVM_CAP_DIRTY_LOG_RING_ACQ_REL)) in vm_enable_dirty_ring()
171 vm_enable_cap(vm, KVM_CAP_DIRTY_LOG_RING_ACQ_REL, ring_size); in vm_enable_dirty_ring()
173 vm_enable_cap(vm, KVM_CAP_DIRTY_LOG_RING, ring_size); in vm_enable_dirty_ring()
174 vm->dirty_ring_size = ring_size; in vm_enable_dirty_ring()
177 static void vm_open(struct kvm_vm *vm) in vm_open() argument
179 vm->kvm_fd = _open_kvm_dev_path_or_exit(O_RDWR); in vm_open()
183 vm->fd = __kvm_ioctl(vm->kvm_fd, KVM_CREATE_VM, (void *)vm in vm_open()
270 vm_populate_gva_bitmap(struct kvm_vm * vm) vm_populate_gva_bitmap() argument
281 struct kvm_vm *vm; ____vm_create() local
485 struct kvm_vm *vm; __vm_create() local
553 struct kvm_vm *vm; __vm_create_with_vcpus() local
573 struct kvm_vm *vm; __vm_create_shape_with_one_vcpu() local
616 vm_arch_vcpu_recreate(struct kvm_vm * vm,u32 vcpu_id) vm_arch_vcpu_recreate() argument
622 vm_recreate_with_one_vcpu(struct kvm_vm * vm) vm_recreate_with_one_vcpu() argument
718 userspace_mem_region_find(struct kvm_vm * vm,u64 start,u64 end) userspace_mem_region_find() argument
771 vm_vcpu_rm(struct kvm_vm * vm,struct kvm_vcpu * vcpu) vm_vcpu_rm() argument
805 __vm_mem_region_delete(struct kvm_vm * vm,struct userspace_mem_region * region) __vm_mem_region_delete() argument
921 __vm_set_user_memory_region(struct kvm_vm * vm,u32 slot,u32 flags,gpa_t gpa,u64 size,void * hva) __vm_set_user_memory_region() argument
935 vm_set_user_memory_region(struct kvm_vm * vm,u32 slot,u32 flags,gpa_t gpa,u64 size,void * hva) vm_set_user_memory_region() argument
948 __vm_set_user_memory_region2(struct kvm_vm * vm,u32 slot,u32 flags,gpa_t gpa,u64 size,void * hva,u32 guest_memfd,u64 guest_memfd_offset) __vm_set_user_memory_region2() argument
967 vm_set_user_memory_region2(struct kvm_vm * vm,u32 slot,u32 flags,gpa_t gpa,u64 size,void * hva,u32 guest_memfd,u64 guest_memfd_offset) vm_set_user_memory_region2() argument
980 vm_mem_add(struct kvm_vm * vm,enum vm_mem_backing_src_type src_type,gpa_t gpa,u32 slot,u64 npages,u32 flags,int guest_memfd,u64 guest_memfd_offset) vm_mem_add() argument
1142 vm_userspace_mem_region_add(struct kvm_vm * vm,enum vm_mem_backing_src_type src_type,gpa_t gpa,u32 slot,u64 npages,u32 flags) vm_userspace_mem_region_add() argument
1165 memslot2region(struct kvm_vm * vm,u32 memslot) memslot2region() argument
1196 vm_mem_region_set_flags(struct kvm_vm * vm,u32 slot,u32 flags) vm_mem_region_set_flags() argument
1212 vm_mem_region_reload(struct kvm_vm * vm,u32 slot) vm_mem_region_reload() argument
1236 vm_mem_region_move(struct kvm_vm * vm,u32 slot,u64 new_gpa) vm_mem_region_move() argument
1265 vm_mem_region_delete(struct kvm_vm * vm,u32 slot) vm_mem_region_delete() argument
1275 vm_guest_mem_fallocate(struct kvm_vm * vm,u64 base,u64 size,bool punch_hole) vm_guest_mem_fallocate() argument
1319 vcpu_exists(struct kvm_vm * vm,u32 vcpu_id) vcpu_exists() argument
1335 __vm_vcpu_add(struct kvm_vm * vm,u32 vcpu_id) __vm_vcpu_add() argument
1374 vm_unused_gva_gap(struct kvm_vm * vm,size_t sz,gva_t min_gva) vm_unused_gva_gap() argument
1439 ____vm_alloc(struct kvm_vm * vm,size_t sz,gva_t min_gva,enum kvm_mem_region_type type,bool protected) ____vm_alloc() argument
1465 __vm_alloc(struct kvm_vm * vm,size_t sz,gva_t min_gva,enum kvm_mem_region_type type) __vm_alloc() argument
1472 vm_alloc_shared(struct kvm_vm * vm,size_t sz,gva_t min_gva,enum kvm_mem_region_type type) vm_alloc_shared() argument
1485 vm_alloc(struct kvm_vm * vm,size_t sz,gva_t min_gva) vm_alloc() argument
1490 vm_alloc_pages(struct kvm_vm * vm,int nr_pages) vm_alloc_pages() argument
1495 __vm_alloc_page(struct kvm_vm * vm,enum kvm_mem_region_type type) __vm_alloc_page() argument
1500 vm_alloc_page(struct kvm_vm * vm) vm_alloc_page() argument
1511 virt_map(struct kvm_vm * vm,gva_t gva,gpa_t gpa,unsigned int npages) virt_map() argument
1544 addr_gpa2hva(struct kvm_vm * vm,gpa_t gpa) addr_gpa2hva() argument
1577 addr_hva2gpa(struct kvm_vm * vm,void * hva) addr_hva2gpa() argument
1620 addr_gpa2alias(struct kvm_vm * vm,gpa_t gpa) addr_gpa2alias() argument
1637 vm_create_irqchip(struct kvm_vm * vm) vm_create_irqchip() argument
1755 __kvm_test_create_device(struct kvm_vm * vm,u64 type) __kvm_test_create_device() argument
1765 __kvm_create_device(struct kvm_vm * vm,u64 type) __kvm_create_device() argument
1807 _kvm_irq_line(struct kvm_vm * vm,u32 irq,int level) _kvm_irq_line() argument
1817 kvm_irq_line(struct kvm_vm * vm,u32 irq,int level) kvm_irq_line() argument
1855 _kvm_gsi_routing_write(struct kvm_vm * vm,struct kvm_irq_routing * routing) _kvm_gsi_routing_write() argument
1866 kvm_gsi_routing_write(struct kvm_vm * vm,struct kvm_irq_routing * routing) kvm_gsi_routing_write() argument
1889 vm_dump(FILE * stream,struct kvm_vm * vm,u8 indent) vm_dump() argument
2024 __vm_phy_pages_alloc(struct kvm_vm * vm,size_t num,gpa_t min_gpa,u32 memslot,bool protected) __vm_phy_pages_alloc() argument
2070 vm_phy_page_alloc(struct kvm_vm * vm,gpa_t min_gpa,u32 memslot) vm_phy_page_alloc() argument
2075 vm_alloc_page_table(struct kvm_vm * vm) vm_alloc_page_table() argument
2093 addr_gva2hva(struct kvm_vm * vm,gva_t gva) addr_gva2hva() argument
2098 vm_compute_max_gfn(struct kvm_vm * vm) vm_compute_max_gfn() argument
2238 kvm_arch_vm_post_create(struct kvm_vm * vm,unsigned int nr_vcpus) kvm_arch_vm_post_create() argument
2242 kvm_arch_vm_finalize_vcpus(struct kvm_vm * vm) kvm_arch_vm_finalize_vcpus() argument
2246 kvm_arch_vm_release(struct kvm_vm * vm) kvm_arch_vm_release() argument
2289 vm_is_gpa_protected(struct kvm_vm * vm,gpa_t gpa) vm_is_gpa_protected() argument
[all...]
/linux/drivers/gpu/drm/radeon/
H A Dradeon_vm.c37 * for the entire GPU, there are multiple VM page tables active
38 * at any given time. The VM page tables can contain a mix
42 * Each VM has an ID associated with it and there is a page table
78 * radeon_vm_manager_init - init the vm manager
82 * Init the vm manager (cayman+).
100 * radeon_vm_manager_fini - tear down the vm manager
104 * Tear down the VM manager (cayman+).
120 * radeon_vm_get_bos - add the vm BOs to a validation list
123 * @vm: vm providing the BOs
130 struct radeon_vm *vm, in radeon_vm_get_bos() argument
[all …]
/linux/tools/testing/selftests/kvm/lib/s390/
H A Dprocessor.c13 void virt_arch_pgd_alloc(struct kvm_vm *vm) in virt_arch_pgd_alloc() argument
17 TEST_ASSERT(vm->page_size == PAGE_SIZE, "Unsupported page size: 0x%x", in virt_arch_pgd_alloc()
18 vm->page_size); in virt_arch_pgd_alloc()
20 if (vm->mmu.pgd_created) in virt_arch_pgd_alloc()
23 gpa = 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, gpa), 0xff, PAGES_PER_REGION * vm->page_size); in virt_arch_pgd_alloc()
28 vm->mmu.pgd = gpa; in virt_arch_pgd_alloc()
29 vm->mmu.pgd_created = true; in virt_arch_pgd_alloc()
37 static u64 virt_alloc_region(struct kvm_vm *vm, int ri) in virt_alloc_region() argument
[all …]
/linux/tools/testing/selftests/kvm/s390/
H A Dcmma_test.c97 static void create_main_memslot(struct kvm_vm *vm) in create_main_memslot() argument
101 vm_userspace_mem_region_add(vm, VM_MEM_SRC_ANONYMOUS, 0, 0, MAIN_PAGE_COUNT, 0); in create_main_memslot()
104 vm->memslots[i] = 0; in create_main_memslot()
107 static void create_test_memslot(struct kvm_vm *vm) in create_test_memslot() argument
109 vm_userspace_mem_region_add(vm, in create_test_memslot()
111 TEST_DATA_START_GFN << vm->page_shift, in create_test_memslot()
116 vm->memslots[MEM_REGION_TEST_DATA] = TEST_DATA_MEMSLOT; in create_test_memslot()
119 static void create_memslots(struct kvm_vm *vm) in create_memslots() argument
122 * Our VM has the following memory layout: in create_memslots()
135 create_main_memslot(vm); in create_memslots()
139 finish_vm_setup(struct kvm_vm * vm) finish_vm_setup() argument
153 struct kvm_vm *vm; create_vm_two_memslots() local
164 enable_cmma(struct kvm_vm * vm) enable_cmma() argument
172 enable_dirty_tracking(struct kvm_vm * vm) enable_dirty_tracking() argument
178 __enable_migration_mode(struct kvm_vm * vm) __enable_migration_mode() argument
187 enable_migration_mode(struct kvm_vm * vm) enable_migration_mode() argument
194 is_migration_mode_on(struct kvm_vm * vm) is_migration_mode_on() argument
208 vm_get_cmma_bits(struct kvm_vm * vm,u64 flags,int * errno_out) vm_get_cmma_bits() argument
229 struct kvm_vm *vm = create_vm_two_memslots(); test_get_cmma_basic() local
274 struct kvm_vm *vm = vm_create_barebones(); test_migration_mode() local
376 assert_all_slots_cmma_dirty(struct kvm_vm * vm) assert_all_slots_cmma_dirty() argument
426 assert_no_pages_cmma_dirty(struct kvm_vm * vm) assert_no_pages_cmma_dirty() argument
449 struct kvm_vm *vm = create_vm_two_memslots(); test_get_initial_dirty() local
473 query_cmma_range(struct kvm_vm * vm,u64 start_gfn,u64 gfn_count,struct kvm_s390_cmma_log * res_out) query_cmma_range() argument
506 struct kvm_vm *vm = create_vm_two_memslots(); test_get_skip_holes() local
668 struct kvm_vm *vm = vm_create_barebones(); machine_has_cmma() local
[all...]
/linux/drivers/gpu/drm/i915/gt/
H A Dgen8_ppgtt.c90 struct drm_i915_private *i915 = ppgtt->vm.i915; in gen8_ppgtt_notify_vgt()
91 struct intel_uncore *uncore = ppgtt->vm.gt->uncore; in gen8_ppgtt_notify_vgt()
102 if (i915_vm_is_4lvl(&ppgtt->vm)) { in gen8_ppgtt_notify_vgt()
180 static unsigned int gen8_pd_top_count(const struct i915_address_space *vm) in gen8_pd_top_count() argument
182 unsigned int shift = __gen8_pte_shift(vm->top); in gen8_pd_top_count()
184 return (vm->total + (1ull << shift) - 1) >> shift; in gen8_pd_top_count()
188 gen8_pdp_for_page_index(struct i915_address_space * const vm, const u64 idx) in gen8_pdp_for_page_index() argument
190 struct i915_ppgtt * const ppgtt = i915_vm_to_ppgtt(vm); in gen8_pdp_for_page_index()
192 if (vm->top == 2) in gen8_pdp_for_page_index()
195 return i915_pd_entry(ppgtt->pd, gen8_pd_index(idx, vm->top)); in gen8_pdp_for_page_index()
[all …]
/linux/sound/pci/ctxfi/
H A Dctvmem.c26 * Find or create vm block based on requested @size.
30 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 guard(mutex)(&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()
52 /* Move the vm node from unused list to used list directly */ in get_vm_block()
53 list_move(&entry->list, &vm->used); in get_vm_block()
54 vm->size -= size; in get_vm_block()
64 list_add(&block->list, &vm->used); in get_vm_block()
[all …]
/linux/drivers/gpu/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 …]
/linux/tools/testing/selftests/kvm/include/x86/
H A Dsev.h34 static inline bool is_sev_snp_vm(struct kvm_vm *vm) in is_sev_snp_vm() argument
36 return vm->type == KVM_X86_SNP_VM; in is_sev_snp_vm()
39 static inline bool is_sev_es_vm(struct kvm_vm *vm) in is_sev_es_vm() argument
41 return is_sev_snp_vm(vm) || vm->type == KVM_X86_SEV_ES_VM; in is_sev_es_vm()
44 static inline bool is_sev_vm(struct kvm_vm *vm) in is_sev_vm() argument
46 return is_sev_es_vm(vm) || vm->type == KVM_X86_SEV_VM; in is_sev_vm()
49 void sev_vm_launch(struct kvm_vm *vm, u32 policy);
50 void sev_vm_launch_measure(struct kvm_vm *vm, u
79 __vm_sev_ioctl(vm,cmd,arg) global() argument
96 vm_sev_ioctl(vm,cmd,arg) global() argument
112 sev_register_encrypted_memory(struct kvm_vm * vm,struct userspace_mem_region * region) sev_register_encrypted_memory() argument
123 sev_launch_update_data(struct kvm_vm * vm,gpa_t gpa,u64 size) sev_launch_update_data() argument
134 snp_launch_update_data(struct kvm_vm * vm,gpa_t gpa,u64 hva,u64 size,u8 type) snp_launch_update_data() argument
[all...]
/linux/tools/testing/selftests/kvm/arm64/
H A Dsmccc_filter.c27 struct kvm_vm *vm = vm_create(1); in test_runs_at_el2() local
30 kvm_get_default_vcpu_target(vm, &init); in test_runs_at_el2()
31 kvm_vm_free(vm); in test_runs_at_el2()
52 static int __set_smccc_filter(struct kvm_vm *vm, u32 start, u32 nr_functions, in __set_smccc_filter() argument
61 return __kvm_device_attr_set(vm->fd, KVM_ARM_VM_SMCCC_CTRL, in __set_smccc_filter()
65 static void set_smccc_filter(struct kvm_vm *vm, u32 start, u32 nr_functions, in set_smccc_filter() argument
68 int ret = __set_smccc_filter(vm, start, nr_functions, action); in set_smccc_filter()
76 struct kvm_vm *vm; in setup_vm() local
78 vm = vm_create(1); in setup_vm()
79 kvm_get_default_vcpu_target(vm, &init); in setup_vm()
[all …]
/linux/tools/testing/selftests/kvm/lib/riscv/
H A Dprocessor.c30 static u64 pte_addr(struct kvm_vm *vm, u64 entry) in pte_addr() argument
36 static u64 ptrs_per_pte(struct kvm_vm *vm) in ptrs_per_pte() argument
55 static u64 pte_index(struct kvm_vm *vm, gva_t gva, int level) in pte_index() argument
59 TEST_ASSERT(level < vm->mmu.pgtable_levels, in pte_index()
65 void virt_arch_pgd_alloc(struct kvm_vm *vm) in virt_arch_pgd_alloc() argument
67 size_t nr_pages = vm_page_align(vm, ptrs_per_pte(vm) * 8) / vm->page_size; in virt_arch_pgd_alloc()
69 if (vm->mmu.pgd_created) in virt_arch_pgd_alloc()
72 vm->mmu.pgd = vm_phy_pages_alloc(vm, nr_pages, in virt_arch_pgd_alloc()
74 vm->memslots[MEM_REGION_PT]); in virt_arch_pgd_alloc()
75 vm->mmu.pgd_created = true; in virt_arch_pgd_alloc()
[all …]

12345678910>>...47