Lines Matching refs:p
250 struct kvmppc_uvmem_slot *p; in kvmppc_uvmem_slot_init() local
252 p = kzalloc(sizeof(*p), GFP_KERNEL); in kvmppc_uvmem_slot_init()
253 if (!p) in kvmppc_uvmem_slot_init()
255 p->pfns = vcalloc(slot->npages, sizeof(*p->pfns)); in kvmppc_uvmem_slot_init()
256 if (!p->pfns) { in kvmppc_uvmem_slot_init()
257 kfree(p); in kvmppc_uvmem_slot_init()
260 p->nr_pfns = slot->npages; in kvmppc_uvmem_slot_init()
261 p->base_pfn = slot->base_gfn; in kvmppc_uvmem_slot_init()
264 list_add(&p->list, &kvm->arch.uvmem_pfns); in kvmppc_uvmem_slot_init()
275 struct kvmppc_uvmem_slot *p, *next; in kvmppc_uvmem_slot_free() local
278 list_for_each_entry_safe(p, next, &kvm->arch.uvmem_pfns, list) { in kvmppc_uvmem_slot_free()
279 if (p->base_pfn == slot->base_gfn) { in kvmppc_uvmem_slot_free()
280 vfree(p->pfns); in kvmppc_uvmem_slot_free()
281 list_del(&p->list); in kvmppc_uvmem_slot_free()
282 kfree(p); in kvmppc_uvmem_slot_free()
292 struct kvmppc_uvmem_slot *p; in kvmppc_mark_gfn() local
294 list_for_each_entry(p, &kvm->arch.uvmem_pfns, list) { in kvmppc_mark_gfn()
295 if (gfn >= p->base_pfn && gfn < p->base_pfn + p->nr_pfns) { in kvmppc_mark_gfn()
296 unsigned long index = gfn - p->base_pfn; in kvmppc_mark_gfn()
299 p->pfns[index] = uvmem_pfn | flag; in kvmppc_mark_gfn()
301 p->pfns[index] = flag; in kvmppc_mark_gfn()
336 struct kvmppc_uvmem_slot *p; in kvmppc_gfn_is_uvmem_pfn() local
338 list_for_each_entry(p, &kvm->arch.uvmem_pfns, list) { in kvmppc_gfn_is_uvmem_pfn()
339 if (gfn >= p->base_pfn && gfn < p->base_pfn + p->nr_pfns) { in kvmppc_gfn_is_uvmem_pfn()
340 unsigned long index = gfn - p->base_pfn; in kvmppc_gfn_is_uvmem_pfn()
342 if (p->pfns[index] & KVMPPC_GFN_UVMEM_PFN) { in kvmppc_gfn_is_uvmem_pfn()
344 *uvmem_pfn = p->pfns[index] & in kvmppc_gfn_is_uvmem_pfn()
364 struct kvmppc_uvmem_slot *p = NULL, *iter; in kvmppc_next_nontransitioned_gfn() local
370 p = iter; in kvmppc_next_nontransitioned_gfn()
373 if (!p) in kvmppc_next_nontransitioned_gfn()
379 for (i = *gfn; i < p->base_pfn + p->nr_pfns; i++) { in kvmppc_next_nontransitioned_gfn()
380 unsigned long index = i - p->base_pfn; in kvmppc_next_nontransitioned_gfn()
382 if (!(p->pfns[index] & KVMPPC_GFN_FLAG_MASK)) { in kvmppc_next_nontransitioned_gfn()