Lines Matching refs:memslot
206 void kvmppc_map_vrma(struct kvm_vcpu *vcpu, struct kvm_memory_slot *memslot, in kvmppc_map_vrma() argument
220 npages = memslot->npages >> (porder - PAGE_SHIFT); in kvmppc_map_vrma()
516 struct kvm_memory_slot *memslot; in kvmppc_book3s_hv_page_fault() local
579 memslot = gfn_to_memslot(kvm, gfn); in kvmppc_book3s_hv_page_fault()
581 trace_kvm_page_fault_enter(vcpu, hpte, memslot, ea, dsisr); in kvmppc_book3s_hv_page_fault()
584 if (!memslot || (memslot->flags & KVM_MEMSLOT_INVALID)) in kvmppc_book3s_hv_page_fault()
592 if (gfn_base < memslot->base_gfn) in kvmppc_book3s_hv_page_fault()
604 hva = gfn_to_hva_memslot(memslot, gfn); in kvmppc_book3s_hv_page_fault()
616 pfn = __gfn_to_pfn_memslot(memslot, gfn, false, false, NULL, in kvmppc_book3s_hv_page_fault()
706 rmap = &memslot->arch.rmap[gfn_base - memslot->base_gfn]; in kvmppc_book3s_hv_page_fault()
759 struct kvm_memory_slot *memslot; in kvmppc_rmap_reset() local
764 kvm_for_each_memslot(memslot, bkt, slots) { in kvmppc_rmap_reset()
771 memset(memslot->arch.rmap, 0, in kvmppc_rmap_reset()
772 memslot->npages * sizeof(*memslot->arch.rmap)); in kvmppc_rmap_reset()
780 struct kvm_memory_slot *memslot, in kvmppc_unmap_hpte() argument
812 if ((rcbits & HPTE_R_C) && memslot->dirty_bitmap) in kvmppc_unmap_hpte()
813 kvmppc_update_dirty_map(memslot, gfn, psize); in kvmppc_unmap_hpte()
821 static void kvm_unmap_rmapp(struct kvm *kvm, struct kvm_memory_slot *memslot, in kvm_unmap_rmapp() argument
828 rmapp = &memslot->arch.rmap[gfn - memslot->base_gfn]; in kvm_unmap_rmapp()
851 kvmppc_unmap_hpte(kvm, i, memslot, rmapp, gfn); in kvm_unmap_rmapp()
873 struct kvm_memory_slot *memslot) in kvmppc_core_flush_memslot_hv() argument
879 gfn = memslot->base_gfn; in kvmppc_core_flush_memslot_hv()
880 rmapp = memslot->arch.rmap; in kvmppc_core_flush_memslot_hv()
882 kvmppc_radix_flush_memslot(kvm, memslot); in kvmppc_core_flush_memslot_hv()
886 for (n = memslot->npages; n; --n, ++gfn) { in kvmppc_core_flush_memslot_hv()
894 kvm_unmap_rmapp(kvm, memslot, gfn); in kvmppc_core_flush_memslot_hv()
899 static bool kvm_age_rmapp(struct kvm *kvm, struct kvm_memory_slot *memslot, in kvm_age_rmapp() argument
908 rmapp = &memslot->arch.rmap[gfn - memslot->base_gfn]; in kvm_age_rmapp()
970 static bool kvm_test_age_rmapp(struct kvm *kvm, struct kvm_memory_slot *memslot, in kvm_test_age_rmapp() argument
979 rmapp = &memslot->arch.rmap[gfn - memslot->base_gfn]; in kvm_test_age_rmapp()
1116 struct kvm_memory_slot *memslot, in kvmppc_harvest_vpa_dirty() argument
1124 if (gfn < memslot->base_gfn || in kvmppc_harvest_vpa_dirty()
1125 gfn >= memslot->base_gfn + memslot->npages) in kvmppc_harvest_vpa_dirty()
1130 __set_bit_le(gfn - memslot->base_gfn, map); in kvmppc_harvest_vpa_dirty()
1134 struct kvm_memory_slot *memslot, unsigned long *map) in kvmppc_hv_get_dirty_log_hpt() argument
1140 rmapp = memslot->arch.rmap; in kvmppc_hv_get_dirty_log_hpt()
1141 for (i = 0; i < memslot->npages; ++i) { in kvmppc_hv_get_dirty_log_hpt()
1159 struct kvm_memory_slot *memslot; in kvmppc_pin_guest_page() local
1167 memslot = gfn_to_memslot(kvm, gfn); in kvmppc_pin_guest_page()
1168 if (!memslot || (memslot->flags & KVM_MEMSLOT_INVALID)) in kvmppc_pin_guest_page()
1170 hva = gfn_to_hva_memslot(memslot, gfn); in kvmppc_pin_guest_page()
1191 struct kvm_memory_slot *memslot; in kvmppc_unpin_guest_page() local
1203 memslot = gfn_to_memslot(kvm, gfn); in kvmppc_unpin_guest_page()
1204 if (memslot && memslot->dirty_bitmap) in kvmppc_unpin_guest_page()
1205 set_bit_le(gfn - memslot->base_gfn, memslot->dirty_bitmap); in kvmppc_unpin_guest_page()
1278 struct kvm_memory_slot *memslot = in resize_hpt_rehash_hpte() local
1281 if (memslot) { in resize_hpt_rehash_hpte()
1283 rmapp = &memslot->arch.rmap[gfn - memslot->base_gfn]; in resize_hpt_rehash_hpte()
1286 kvmppc_unmap_hpte(kvm, idx, memslot, rmapp, gfn); in resize_hpt_rehash_hpte()