Lines Matching refs:has
583 static inline bool has_pfn_is_backed(struct hv_hotadd_state *has, in has_pfn_is_backed() argument
589 if ((pfn < has->covered_start_pfn) || (pfn >= has->covered_end_pfn)) in has_pfn_is_backed()
593 list_for_each_entry(gap, &has->gap_list, list) { in has_pfn_is_backed()
605 struct hv_hotadd_state *has; in hv_page_offline_check() local
614 list_for_each_entry(has, &dm_device.ha_region_list, list) { in hv_page_offline_check()
615 while ((pfn >= has->start_pfn) && in hv_page_offline_check()
616 (pfn < has->end_pfn) && in hv_page_offline_check()
619 if (has_pfn_is_backed(has, pfn)) in hv_page_offline_check()
680 static void hv_page_online_one(struct hv_hotadd_state *has, struct page *pg) in hv_page_online_one() argument
682 if (!has_pfn_is_backed(has, page_to_pfn(pg))) { in hv_page_online_one()
697 static void hv_bring_pgs_online(struct hv_hotadd_state *has, in hv_bring_pgs_online() argument
704 hv_page_online_one(has, pfn_to_page(start_pfn + i)); in hv_bring_pgs_online()
709 struct hv_hotadd_state *has) in hv_mem_hot_add() argument
722 has->ha_end_pfn += HA_CHUNK; in hv_mem_hot_add()
732 has->covered_end_pfn += processed_pfn; in hv_mem_hot_add()
754 has->ha_end_pfn -= HA_CHUNK; in hv_mem_hot_add()
755 has->covered_end_pfn -= processed_pfn; in hv_mem_hot_add()
775 struct hv_hotadd_state *has; in hv_online_page() local
780 list_for_each_entry(has, &dm_device.ha_region_list, list) { in hv_online_page()
782 if ((pfn < has->start_pfn) || in hv_online_page()
783 (pfn + (1UL << order) > has->end_pfn)) in hv_online_page()
786 hv_bring_pgs_online(has, pfn, 1UL << order); in hv_online_page()
794 struct hv_hotadd_state *has; in pfn_covered() local
801 list_for_each_entry(has, &dm_device.ha_region_list, list) { in pfn_covered()
806 if (start_pfn < has->start_pfn || start_pfn >= has->end_pfn) in pfn_covered()
813 if (has->covered_end_pfn != start_pfn) { in pfn_covered()
821 gap->start_pfn = has->covered_end_pfn; in pfn_covered()
823 list_add_tail(&gap->list, &has->gap_list); in pfn_covered()
825 has->covered_end_pfn = start_pfn; in pfn_covered()
832 if ((start_pfn + pfn_cnt) > has->end_pfn) { in pfn_covered()
833 residual = (start_pfn + pfn_cnt - has->end_pfn); in pfn_covered()
841 has->end_pfn += new_inc; in pfn_covered()
858 struct hv_hotadd_state *has; in handle_pg_range() local
867 list_for_each_entry(has, &dm_device.ha_region_list, list) { in handle_pg_range()
872 if (start_pfn < has->start_pfn || start_pfn >= has->end_pfn) in handle_pg_range()
875 old_covered_state = has->covered_end_pfn; in handle_pg_range()
877 if (start_pfn < has->ha_end_pfn) { in handle_pg_range()
883 pgs_ol = has->ha_end_pfn - start_pfn; in handle_pg_range()
887 has->covered_end_pfn += pgs_ol; in handle_pg_range()
897 if (start_pfn > has->start_pfn && in handle_pg_range()
899 hv_bring_pgs_online(has, start_pfn, pgs_ol); in handle_pg_range()
903 if ((has->ha_end_pfn < has->end_pfn) && (pfn_cnt > 0)) { in handle_pg_range()
911 size = (has->end_pfn - has->ha_end_pfn); in handle_pg_range()
920 hv_mem_hot_add(has->ha_end_pfn, size, pfn_cnt, has); in handle_pg_range()
927 res = has->covered_end_pfn - old_covered_state; in handle_pg_range()
1996 struct hv_hotadd_state *has, *tmp; in balloon_remove() local
2025 list_for_each_entry_safe(has, tmp, &dm->ha_region_list, list) { in balloon_remove()
2026 list_for_each_entry_safe(gap, tmp_gap, &has->gap_list, list) { in balloon_remove()
2030 list_del(&has->list); in balloon_remove()
2031 kfree(has); in balloon_remove()