Home
last modified time | relevance | path

Searched refs:mmu_lock (Results 1 – 25 of 30) sorted by relevance

12

/linux-6.6.21/virt/kvm/
Dkvm_mm.h14 #define KVM_MMU_LOCK_INIT(kvm) rwlock_init(&(kvm)->mmu_lock)
15 #define KVM_MMU_LOCK(kvm) write_lock(&(kvm)->mmu_lock)
16 #define KVM_MMU_UNLOCK(kvm) write_unlock(&(kvm)->mmu_lock)
18 #define KVM_MMU_LOCK_INIT(kvm) spin_lock_init(&(kvm)->mmu_lock)
19 #define KVM_MMU_LOCK(kvm) spin_lock(&(kvm)->mmu_lock)
20 #define KVM_MMU_UNLOCK(kvm) spin_unlock(&(kvm)->mmu_lock)
/linux-6.6.21/arch/x86/kvm/mmu/
Dpage_track.c80 lockdep_assert_held_write(&kvm->mmu_lock); in __kvm_write_track_add_gfn()
103 lockdep_assert_held_write(&kvm->mmu_lock); in __kvm_write_track_remove_gfn()
172 write_lock(&kvm->mmu_lock); in kvm_page_track_register_notifier()
174 write_unlock(&kvm->mmu_lock); in kvm_page_track_register_notifier()
190 write_lock(&kvm->mmu_lock); in kvm_page_track_unregister_notifier()
192 write_unlock(&kvm->mmu_lock); in kvm_page_track_unregister_notifier()
268 write_lock(&kvm->mmu_lock); in kvm_write_track_add_gfn()
270 write_unlock(&kvm->mmu_lock); in kvm_write_track_add_gfn()
298 write_lock(&kvm->mmu_lock); in kvm_write_track_remove_gfn()
300 write_unlock(&kvm->mmu_lock); in kvm_write_track_remove_gfn()
Dtdp_mmu.c26 lockdep_assert_held_read(&kvm->mmu_lock); in kvm_lockdep_assert_mmu_lock_held()
28 lockdep_assert_held_write(&kvm->mmu_lock); in kvm_lockdep_assert_mmu_lock_held()
226 lockdep_assert_held_write(&kvm->mmu_lock); in kvm_tdp_mmu_get_vcpu_root_hpa()
294 lockdep_assert_held_write(&kvm->mmu_lock); in tdp_mmu_unlink_sp()
542 lockdep_assert_held_read(&kvm->mmu_lock); in tdp_mmu_set_spte_atomic()
606 lockdep_assert_held_write(&kvm->mmu_lock); in tdp_mmu_set_spte()
669 if (need_resched() || rwlock_needbreak(&kvm->mmu_lock)) { in tdp_mmu_iter_cond_resched()
676 cond_resched_rwlock_read(&kvm->mmu_lock); in tdp_mmu_iter_cond_resched()
678 cond_resched_rwlock_write(&kvm->mmu_lock); in tdp_mmu_iter_cond_resched()
798 lockdep_assert_held_write(&kvm->mmu_lock); in tdp_mmu_zap_leafs()
[all …]
Dmmu.c2113 if (need_resched() || rwlock_needbreak(&vcpu->kvm->mmu_lock)) { in mmu_sync_children()
2120 cond_resched_rwlock_write(&vcpu->kvm->mmu_lock); in mmu_sync_children()
2570 lockdep_assert_held_write(&kvm->mmu_lock); in __kvm_mmu_prepare_zap_page()
2737 write_lock(&kvm->mmu_lock); in kvm_mmu_change_mmu_pages()
2748 write_unlock(&kvm->mmu_lock); in kvm_mmu_change_mmu_pages()
2758 write_lock(&kvm->mmu_lock); in kvm_mmu_unprotect_page()
2764 write_unlock(&kvm->mmu_lock); in kvm_mmu_unprotect_page()
3584 write_lock(&kvm->mmu_lock); in kvm_mmu_free_roots()
3611 write_unlock(&kvm->mmu_lock); in kvm_mmu_free_roots()
3668 write_lock(&vcpu->kvm->mmu_lock); in mmu_alloc_direct_roots()
[all …]
Dpaging_tmpl.h839 write_lock(&vcpu->kvm->mmu_lock); in FNAME()
850 write_unlock(&vcpu->kvm->mmu_lock); in FNAME()
/linux-6.6.21/arch/riscv/kvm/
Dmmu.c301 cond_resched_lock(&kvm->mmu_lock); in gstage_unmap_range()
340 spin_lock(&kvm->mmu_lock); in gstage_wp_memory_region()
342 spin_unlock(&kvm->mmu_lock); in gstage_wp_memory_region()
372 spin_lock(&kvm->mmu_lock); in kvm_riscv_gstage_ioremap()
374 spin_unlock(&kvm->mmu_lock); in kvm_riscv_gstage_ioremap()
388 spin_lock(&kvm->mmu_lock); in kvm_riscv_gstage_iounmap()
390 spin_unlock(&kvm->mmu_lock); in kvm_riscv_gstage_iounmap()
428 spin_lock(&kvm->mmu_lock); in kvm_arch_flush_shadow_memslot()
430 spin_unlock(&kvm->mmu_lock); in kvm_arch_flush_shadow_memslot()
686 spin_lock(&kvm->mmu_lock); in kvm_riscv_gstage_map()
[all …]
/linux-6.6.21/arch/arm64/kvm/
Dmmu.c76 cond_resched_rwlock_write(&kvm->mmu_lock); in stage2_apply_range()
105 if (need_resched() || rwlock_needbreak(&kvm->mmu_lock)) in need_split_memcache_topup_or_resched()
122 lockdep_assert_held_write(&kvm->mmu_lock); in kvm_mmu_split_huge_pages()
134 write_unlock(&kvm->mmu_lock); in kvm_mmu_split_huge_pages()
140 write_lock(&kvm->mmu_lock); in kvm_mmu_split_huge_pages()
325 lockdep_assert_held_write(&kvm->mmu_lock); in __unmap_stage2_range()
359 write_lock(&kvm->mmu_lock); in stage2_flush_vm()
365 write_unlock(&kvm->mmu_lock); in stage2_flush_vm()
998 write_lock(&kvm->mmu_lock); in stage2_unmap_vm()
1004 write_unlock(&kvm->mmu_lock); in stage2_unmap_vm()
[all …]
/linux-6.6.21/arch/powerpc/kvm/
Dbook3s_hv_nested.c745 spin_lock(&kvm->mmu_lock); in kvmhv_remove_nested()
751 spin_unlock(&kvm->mmu_lock); in kvmhv_remove_nested()
770 spin_lock(&kvm->mmu_lock); in kvmhv_release_all_nested()
780 spin_unlock(&kvm->mmu_lock); in kvmhv_release_all_nested()
797 spin_lock(&kvm->mmu_lock); in kvmhv_flush_nested()
799 spin_unlock(&kvm->mmu_lock); in kvmhv_flush_nested()
814 spin_lock(&kvm->mmu_lock); in kvmhv_get_nested()
818 spin_unlock(&kvm->mmu_lock); in kvmhv_get_nested()
832 spin_lock(&kvm->mmu_lock); in kvmhv_get_nested()
841 spin_unlock(&kvm->mmu_lock); in kvmhv_get_nested()
[all …]
Dbook3s_mmu_hpte.c63 spin_lock(&vcpu3s->mmu_lock); in kvmppc_mmu_hpte_cache_map()
92 spin_unlock(&vcpu3s->mmu_lock); in kvmppc_mmu_hpte_cache_map()
110 spin_lock(&vcpu3s->mmu_lock); in invalidate_pte()
114 spin_unlock(&vcpu3s->mmu_lock); in invalidate_pte()
127 spin_unlock(&vcpu3s->mmu_lock); in invalidate_pte()
369 spin_lock_init(&vcpu3s->mmu_lock); in kvmppc_mmu_hpte_init()
Dbook3s_64_mmu_radix.c642 spin_lock(&kvm->mmu_lock); in kvmppc_create_pte()
778 spin_unlock(&kvm->mmu_lock); in kvmppc_create_pte()
866 spin_lock(&kvm->mmu_lock); in kvmppc_book3s_instantiate_page()
871 spin_unlock(&kvm->mmu_lock); in kvmppc_book3s_instantiate_page()
1006 spin_lock(&kvm->mmu_lock); in kvmppc_book3s_radix_page_fault()
1010 spin_unlock(&kvm->mmu_lock); in kvmppc_book3s_radix_page_fault()
1116 spin_lock(&kvm->mmu_lock); in kvm_radix_test_clear_dirty()
1128 spin_unlock(&kvm->mmu_lock); in kvm_radix_test_clear_dirty()
1143 spin_unlock(&kvm->mmu_lock); in kvm_radix_test_clear_dirty()
1188 spin_lock(&kvm->mmu_lock); in kvmppc_radix_flush_memslot()
[all …]
Dbook3s_hv_rm_mmu.c248 arch_spin_lock(&kvm->mmu_lock.rlock.raw_lock); in kvmppc_do_h_enter()
263 arch_spin_unlock(&kvm->mmu_lock.rlock.raw_lock); in kvmppc_do_h_enter()
277 arch_spin_unlock(&kvm->mmu_lock.rlock.raw_lock); in kvmppc_do_h_enter()
938 arch_spin_lock(&kvm->mmu_lock.rlock.raw_lock); in kvmppc_do_h_page_init_zero()
950 arch_spin_unlock(&kvm->mmu_lock.rlock.raw_lock); in kvmppc_do_h_page_init_zero()
966 arch_spin_lock(&kvm->mmu_lock.rlock.raw_lock); in kvmppc_do_h_page_init_copy()
981 arch_spin_unlock(&kvm->mmu_lock.rlock.raw_lock); in kvmppc_do_h_page_init_copy()
Dbook3s_64_mmu_host.c153 spin_lock(&kvm->mmu_lock); in kvmppc_mmu_map_page()
205 spin_unlock(&kvm->mmu_lock); in kvmppc_mmu_map_page()
Dbook3s_64_mmu_hv.c632 spin_lock(&kvm->mmu_lock); in kvmppc_book3s_hv_page_fault()
637 spin_unlock(&kvm->mmu_lock); in kvmppc_book3s_hv_page_fault()
766 spin_lock(&kvm->mmu_lock); in kvmppc_rmap_reset()
773 spin_unlock(&kvm->mmu_lock); in kvmppc_rmap_reset()
1406 spin_lock(&kvm->mmu_lock); in resize_hpt_pivot()
1413 spin_unlock(&kvm->mmu_lock); in resize_hpt_pivot()
De500_mmu_host.c462 spin_lock(&kvm->mmu_lock); in kvmppc_e500_shadow_map()
502 spin_unlock(&kvm->mmu_lock); in kvmppc_e500_shadow_map()
/linux-6.6.21/drivers/accel/habanalabs/common/
Dcommand_buffer.c41 mutex_lock(&hdev->mmu_lock); in cb_map_mem()
53 mutex_unlock(&hdev->mmu_lock); in cb_map_mem()
62 mutex_unlock(&hdev->mmu_lock); in cb_map_mem()
72 mutex_lock(&hdev->mmu_lock); in cb_unmap_mem()
75 mutex_unlock(&hdev->mmu_lock); in cb_unmap_mem()
Dmemory.c1186 mutex_lock(&hdev->mmu_lock); in map_device_va()
1191 mutex_unlock(&hdev->mmu_lock); in map_device_va()
1197 mutex_unlock(&hdev->mmu_lock); in map_device_va()
1352 mutex_lock(&hdev->mmu_lock); in unmap_device_va()
1365 mutex_unlock(&hdev->mmu_lock); in unmap_device_va()
2759 mutex_lock(&hdev->mmu_lock); in hl_vm_ctx_fini()
2765 mutex_unlock(&hdev->mmu_lock); in hl_vm_ctx_fini()
/linux-6.6.21/arch/mips/kvm/
Dmmu.c521 spin_lock(&kvm->mmu_lock); in _kvm_mips_map_page_fast()
556 spin_unlock(&kvm->mmu_lock); in _kvm_mips_map_page_fast()
638 spin_lock(&kvm->mmu_lock); in kvm_mips_map_page()
646 spin_unlock(&kvm->mmu_lock); in kvm_mips_map_page()
675 spin_unlock(&kvm->mmu_lock); in kvm_mips_map_page()
Dmips.c198 spin_lock(&kvm->mmu_lock); in kvm_arch_flush_shadow_memslot()
203 spin_unlock(&kvm->mmu_lock); in kvm_arch_flush_shadow_memslot()
233 spin_lock(&kvm->mmu_lock); in kvm_arch_commit_memory_region()
239 spin_unlock(&kvm->mmu_lock); in kvm_arch_commit_memory_region()
/linux-6.6.21/arch/x86/kvm/
Ddebugfs.c112 write_lock(&kvm->mmu_lock); in kvm_mmu_rmaps_stat_show()
132 write_unlock(&kvm->mmu_lock); in kvm_mmu_rmaps_stat_show()
/linux-6.6.21/drivers/accel/habanalabs/common/mmu/
Dmmu.c50 mutex_init(&hdev->mmu_lock); in hl_mmu_init()
94 mutex_destroy(&hdev->mmu_lock); in hl_mmu_fini()
572 mutex_lock(&hdev->mmu_lock); in hl_mmu_get_tlb_info()
574 mutex_unlock(&hdev->mmu_lock); in hl_mmu_get_tlb_info()
674 mutex_lock(&hdev->mmu_lock); in hl_mmu_prefetch_work_function()
678 mutex_unlock(&hdev->mmu_lock); in hl_mmu_prefetch_work_function()
/linux-6.6.21/Documentation/virt/kvm/
Dlocking.rst46 - kvm->arch.mmu_lock is an rwlock. kvm->arch.tdp_mmu_pages_lock and
47 kvm->arch.mmu_unsync_pages_lock are taken inside kvm->arch.mmu_lock, and
48 cannot be taken without already holding kvm->arch.mmu_lock (typically with
252 ``kvm->mmu_lock``
/linux-6.6.21/arch/powerpc/include/asm/
Dkvm_book3s_64.h654 VM_WARN(!spin_is_locked(&kvm->mmu_lock), in find_kvm_secondary_pte()
666 VM_WARN(!spin_is_locked(&kvm->mmu_lock), in find_kvm_host_pte()
Dkvm_book3s.h134 spinlock_t mmu_lock; member
/linux-6.6.21/include/linux/
Dkvm_host.h706 rwlock_t mmu_lock; member
708 spinlock_t mmu_lock;
1977 lockdep_assert_held(&kvm->mmu_lock); in mmu_invalidate_retry_hva()
/linux-6.6.21/drivers/accel/habanalabs/gaudi2/
Dgaudi2.c10332 mutex_lock(&hdev->mmu_lock); in gaudi2_debugfs_read_dma()
10348 mutex_unlock(&hdev->mmu_lock); in gaudi2_debugfs_read_dma()
10377 mutex_lock(&hdev->mmu_lock); in gaudi2_debugfs_read_dma()
10387 mutex_unlock(&hdev->mmu_lock); in gaudi2_debugfs_read_dma()
10439 mutex_lock(&hdev->mmu_lock); in gaudi2_internal_cb_pool_init()
10450 mutex_unlock(&hdev->mmu_lock); in gaudi2_internal_cb_pool_init()
10457 mutex_unlock(&hdev->mmu_lock); in gaudi2_internal_cb_pool_init()
10475 mutex_lock(&hdev->mmu_lock); in gaudi2_internal_cb_pool_fini()
10479 mutex_unlock(&hdev->mmu_lock); in gaudi2_internal_cb_pool_fini()

12