/arch/powerpc/kvm/ |
D | book3s_hv_rm_mmu.c | 82 unsigned long *rmap, long pte_index, int realmode) in kvmppc_add_revmap_chain() argument 87 if (*rmap & KVMPPC_RMAP_PRESENT) { in kvmppc_add_revmap_chain() 88 i = *rmap & KVMPPC_RMAP_INDEX; in kvmppc_add_revmap_chain() 101 *rmap = (*rmap & ~KVMPPC_RMAP_INDEX) | in kvmppc_add_revmap_chain() 104 unlock_rmap(rmap); in kvmppc_add_revmap_chain() 143 unsigned long *rmap; in revmap_for_hpte() local 155 rmap = real_vmalloc_addr(&memslot->arch.rmap[gfn - memslot->base_gfn]); in revmap_for_hpte() 156 return rmap; in revmap_for_hpte() 166 unsigned long *rmap; in remove_revmap_chain() local 173 rmap = revmap_for_hpte(kvm, hpte_v, ptel, &memslot, &gfn); in remove_revmap_chain() [all …]
|
D | book3s_hv_nested.c | 809 u64 rmap, new_rmap = (*n_rmap)->rmap; in kvmhv_insert_nest_rmap() local 819 for_each_nest_rmap_safe(cursor, entry, &rmap) { in kvmhv_insert_nest_rmap() 820 if (kvmhv_n_rmap_is_equal(rmap, new_rmap)) in kvmhv_insert_nest_rmap() 825 rmap = *rmapp; in kvmhv_insert_nest_rmap() 826 if (rmap & RMAP_NESTED_IS_SINGLE_ENTRY) /* Not previously a list */ in kvmhv_insert_nest_rmap() 829 if (rmap & RMAP_NESTED_IS_SINGLE_ENTRY) /* Not previously a list */ in kvmhv_insert_nest_rmap() 830 (*n_rmap)->list.next = (struct llist_node *) rmap; in kvmhv_insert_nest_rmap() 871 unsigned long rmap, mask; in kvmhv_update_nest_rmap_rc_list() local 879 for_each_nest_rmap_safe(cursor, entry, &rmap) in kvmhv_update_nest_rmap_rc_list() 880 kvmhv_update_nest_rmap_rc(kvm, rmap, clr, set, hpa, mask); in kvmhv_update_nest_rmap_rc_list() [all …]
|
D | book3s_64_mmu_hv.c | 493 unsigned long *rmap; in kvmppc_book3s_hv_page_fault() local 682 rmap = &memslot->arch.rmap[gfn_base - memslot->base_gfn]; in kvmppc_book3s_hv_page_fault() 683 lock_rmap(rmap); in kvmppc_book3s_hv_page_fault() 688 unlock_rmap(rmap); in kvmppc_book3s_hv_page_fault() 693 rcbits = *rmap >> KVMPPC_RMAP_RC_SHIFT; in kvmppc_book3s_hv_page_fault() 698 unlock_rmap(rmap); in kvmppc_book3s_hv_page_fault() 704 kvmppc_add_revmap_chain(kvm, rev, rmap, index, 0); in kvmppc_book3s_hv_page_fault() 747 memset(memslot->arch.rmap, 0, in kvmppc_rmap_reset() 748 memslot->npages * sizeof(*memslot->arch.rmap)); in kvmppc_rmap_reset() 849 rmapp = &memslot->arch.rmap[gfn - memslot->base_gfn]; in kvm_unmap_rmapp() [all …]
|
D | book3s_64_mmu_radix.c | 1036 rmapp = &memslot->arch.rmap[gfn - memslot->base_gfn]; in kvm_age_radix() 1110 rmapp = &memslot->arch.rmap[gfn - memslot->base_gfn]; in kvm_radix_test_clear_dirty()
|
D | book3s_hv.c | 4576 vfree(slot->arch.rmap); in kvmppc_core_free_memslot_hv() 4577 slot->arch.rmap = NULL; in kvmppc_core_free_memslot_hv() 4588 unsigned long size = array_size(npages, sizeof(*slot->arch.rmap)); in kvmppc_core_prepare_memory_region_hv() 4593 slot->arch.rmap = vzalloc(size); in kvmppc_core_prepare_memory_region_hv() 4594 if (!slot->arch.rmap) in kvmppc_core_prepare_memory_region_hv()
|
/arch/powerpc/include/asm/ |
D | kvm_book3s_64.h | 65 u64 rmap; member 105 ((u64) (node)) : ((pos)->rmap))) && \ 474 static inline void lock_rmap(unsigned long *rmap) in lock_rmap() argument 477 while (test_bit(KVMPPC_RMAP_LOCK_BIT, rmap)) in lock_rmap() 479 } while (test_and_set_bit_lock(KVMPPC_RMAP_LOCK_BIT, rmap)); in lock_rmap() 482 static inline void unlock_rmap(unsigned long *rmap) in unlock_rmap() argument 484 __clear_bit_unlock(KVMPPC_RMAP_LOCK_BIT, rmap); in unlock_rmap()
|
D | kvm_book3s.h | 239 unsigned long *rmap, long pte_index, int realmode);
|
D | kvm_host.h | 262 unsigned long *rmap; member
|
/arch/s390/mm/ |
D | gmap.c | 152 struct gmap_rmap *rmap, *rnext, *head; in gmap_rmap_radix_tree_free() local 171 gmap_for_each_rmap_safe(rmap, rnext, head) in gmap_rmap_radix_tree_free() 172 kfree(rmap); in gmap_rmap_radix_tree_free() 1179 struct gmap_rmap *rmap) in gmap_insert_rmap() argument 1186 rmap->next = radix_tree_deref_slot_protected(slot, in gmap_insert_rmap() 1188 radix_tree_replace_slot(&sg->host_to_rmap, slot, rmap); in gmap_insert_rmap() 1190 rmap->next = NULL; in gmap_insert_rmap() 1192 rmap); in gmap_insert_rmap() 1210 struct gmap_rmap *rmap; in gmap_protect_rmap() local 1222 rmap = kzalloc(sizeof(*rmap), GFP_KERNEL); in gmap_protect_rmap() [all …]
|
/arch/x86/kvm/mmu/ |
D | mmu.c | 943 return &slot->arch.rmap[level - PG_LEVEL_4K][idx]; in __gfn_to_rmap() 1389 struct kvm_rmap_head *rmap; member 1401 iterator->rmap = __gfn_to_rmap(iterator->gfn, level, iterator->slot); in rmap_walk_init_level() 1422 return !!iterator->rmap; in slot_rmap_walk_okay() 1427 if (++iterator->rmap <= iterator->end_rmap) { in slot_rmap_walk_next() 1433 iterator->rmap = NULL; in slot_rmap_walk_next() 1486 ret |= handler(kvm, iterator.rmap, memslot, in kvm_handle_hva_range() 5244 if (iterator.rmap) in slot_handle_level_range() 5245 flush |= fn(kvm, iterator.rmap); in slot_handle_level_range()
|
/arch/x86/include/asm/ |
D | kvm_host.h | 817 struct kvm_rmap_head *rmap[KVM_NR_PAGE_SIZES]; member
|
/arch/x86/kvm/ |
D | x86.c | 10794 kvfree(slot->arch.rmap[i]); in kvm_arch_free_memslot() 10795 slot->arch.rmap[i] = NULL; in kvm_arch_free_memslot() 10828 slot->arch.rmap[i] = in kvm_alloc_memslot_metadata() 10829 __vcalloc(lpages, sizeof(*slot->arch.rmap[i]), in kvm_alloc_memslot_metadata() 10831 if (!slot->arch.rmap[i]) in kvm_alloc_memslot_metadata() 10866 kvfree(slot->arch.rmap[i]); in kvm_alloc_memslot_metadata() 10867 slot->arch.rmap[i] = NULL; in kvm_alloc_memslot_metadata()
|