Lines Matching refs:map
2804 * or the caller allows to map a writable pfn for a read fault
2830 * MMU, we lookup the page using GUP to map it, so the guest VCPU can
2859 /* map read fault as writable if possible */
2970 * @writable: whether it allows to map a writable host page for !@write_fault
2972 * The function will map a writable host page for these two cases:
3049 /* Do not map writable pfn in the readonly memslot. */
3149 int kvm_vcpu_map(struct kvm_vcpu *vcpu, gfn_t gfn, struct kvm_host_map *map)
3155 if (!map)
3174 map->page = page;
3175 map->hva = hva;
3176 map->pfn = pfn;
3177 map->gfn = gfn;
3183 void kvm_vcpu_unmap(struct kvm_vcpu *vcpu, struct kvm_host_map *map, bool dirty)
3185 if (!map)
3188 if (!map->hva)
3191 if (map->page != KVM_UNMAPPED_PAGE)
3192 kunmap(map->page);
3195 memunmap(map->hva);
3199 kvm_vcpu_mark_page_dirty(vcpu, map->gfn);
3201 kvm_release_pfn(map->pfn, dirty);
3203 map->hva = NULL;
3204 map->page = NULL;