Lines Matching full:ent

495 	struct hv_enc_pfn_region *ent;  in hv_list_enc_add()  local
505 list_for_each_entry(ent, &hv_list_enc, list) { in hv_list_enc_add()
506 if ((ent->pfn <= pfn) && (ent->pfn + ent->count - 1 >= pfn)) in hv_list_enc_add()
518 list_for_each_entry(ent, &hv_list_enc, list) { in hv_list_enc_add()
519 if (ent->pfn + ent->count == pfn) { in hv_list_enc_add()
521 ent->count++; in hv_list_enc_add()
523 } else if (pfn + 1 == ent->pfn) { in hv_list_enc_add()
525 ent->pfn--; in hv_list_enc_add()
526 ent->count++; in hv_list_enc_add()
533 ent = kzalloc(sizeof(struct hv_enc_pfn_region), GFP_KERNEL); in hv_list_enc_add()
534 if (!ent) in hv_list_enc_add()
537 ent->pfn = pfn; in hv_list_enc_add()
538 ent->count = 1; in hv_list_enc_add()
541 list_add(&ent->list, &hv_list_enc); in hv_list_enc_add()
552 struct hv_enc_pfn_region *ent, *t; in hv_list_enc_remove() local
562 list_for_each_entry_safe(ent, t, &hv_list_enc, list) { in hv_list_enc_remove()
563 if (pfn == ent->pfn + ent->count - 1) { in hv_list_enc_remove()
565 ent->count--; in hv_list_enc_remove()
566 if (!ent->count) { in hv_list_enc_remove()
567 list_del(&ent->list); in hv_list_enc_remove()
568 kfree(ent); in hv_list_enc_remove()
571 } else if (pfn == ent->pfn) { in hv_list_enc_remove()
573 ent->count--; in hv_list_enc_remove()
574 ent->pfn++; in hv_list_enc_remove()
575 if (!ent->count) { in hv_list_enc_remove()
576 list_del(&ent->list); in hv_list_enc_remove()
577 kfree(ent); in hv_list_enc_remove()
580 } else if (pfn > ent->pfn && pfn < ent->pfn + ent->count - 1) { in hv_list_enc_remove()
587 new_region.count = ent->count - (pfn - ent->pfn + 1); in hv_list_enc_remove()
588 ent->count = pfn - ent->pfn; in hv_list_enc_remove()
600 ent = kzalloc(sizeof(struct hv_enc_pfn_region), GFP_KERNEL); in hv_list_enc_remove()
601 if (!ent) in hv_list_enc_remove()
604 ent->pfn = new_region.pfn; in hv_list_enc_remove()
605 ent->count = new_region.count; in hv_list_enc_remove()
608 list_add(&ent->list, &hv_list_enc); in hv_list_enc_remove()
634 struct hv_enc_pfn_region *ent; in hv_vtom_kexec_finish() local
645 list_for_each_entry(ent, &hv_list_enc, list) { in hv_vtom_kexec_finish()
646 for (i = 0, cur = 0; i < ent->count; i++) { in hv_vtom_kexec_finish()
647 input->gpa_page_list[cur] = ent->pfn + i; in hv_vtom_kexec_finish()
650 if (cur == HV_MAX_MODIFY_GPA_REP_COUNT || i == ent->count - 1) { in hv_vtom_kexec_finish()