Lines Matching full:has

193  * if the host has accepted the version sent by the guest.
195 * is_accepted: If TRUE, host has accepted the version and the guest
222 * guest. This message notifies if the host has accepted the guest's
223 * capabilities. If the host has not accepted, the guest must shutdown
226 * is_accepted: Indicates if the host has accepted guest's capabilities.
352 * the guest has hit an upper physical memory barrier.
414 * that the host has asked us to hot add. The range
525 * This state tracks if the host has specified a hot-add
582 static inline bool has_pfn_is_backed(struct hv_hotadd_state *has, in has_pfn_is_backed() argument
588 if (pfn < has->covered_start_pfn || pfn >= has->covered_end_pfn) in has_pfn_is_backed()
592 list_for_each_entry(gap, &has->gap_list, list) { in has_pfn_is_backed()
604 struct hv_hotadd_state *has; in hv_page_offline_check() local
609 * Search for HAS which covers the pfn and when we find one in hv_page_offline_check()
613 list_for_each_entry(has, &dm_device.ha_region_list, list) { in hv_page_offline_check()
614 while ((pfn >= has->start_pfn) && in hv_page_offline_check()
615 (pfn < has->end_pfn) && in hv_page_offline_check()
618 if (has_pfn_is_backed(has, pfn)) in hv_page_offline_check()
625 * This PFN is not in any HAS (e.g. we're offlining a region 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()
696 static void hv_bring_pgs_online(struct hv_hotadd_state *has, in hv_bring_pgs_online() argument
703 hv_page_online_one(has, pfn_to_page(start_pfn + i)); in hv_bring_pgs_online()
708 struct hv_hotadd_state *has) in hv_mem_hot_add() argument
720 has->ha_end_pfn += ha_pages_in_chunk; in hv_mem_hot_add()
723 has->covered_end_pfn += processed_pfn; in hv_mem_hot_add()
745 has->ha_end_pfn -= ha_pages_in_chunk; in hv_mem_hot_add()
746 has->covered_end_pfn -= processed_pfn; in hv_mem_hot_add()
766 struct hv_hotadd_state *has; in hv_online_page() local
770 list_for_each_entry(has, &dm_device.ha_region_list, list) { in hv_online_page()
771 /* The page belongs to a different HAS. */ in hv_online_page()
772 if (pfn < has->start_pfn || in hv_online_page()
773 (pfn + (1UL << order) > has->end_pfn)) in hv_online_page()
776 hv_bring_pgs_online(has, pfn, 1UL << order); in hv_online_page()
783 struct hv_hotadd_state *has; in pfn_covered() local
789 list_for_each_entry(has, &dm_device.ha_region_list, list) { in pfn_covered()
794 if (start_pfn < has->start_pfn || start_pfn >= has->end_pfn) in pfn_covered()
801 if (has->covered_end_pfn != start_pfn) { in pfn_covered()
809 gap->start_pfn = has->covered_end_pfn; in pfn_covered()
811 list_add_tail(&gap->list, &has->gap_list); in pfn_covered()
813 has->covered_end_pfn = start_pfn; in pfn_covered()
820 if ((start_pfn + pfn_cnt) > has->end_pfn) { in pfn_covered()
822 residual = (start_pfn + pfn_cnt - has->end_pfn); in pfn_covered()
823 has->end_pfn += ALIGN(residual, ha_pages_in_chunk); in pfn_covered()
839 struct hv_hotadd_state *has; in handle_pg_range() local
848 list_for_each_entry(has, &dm_device.ha_region_list, list) { in handle_pg_range()
853 if (start_pfn < has->start_pfn || start_pfn >= has->end_pfn) in handle_pg_range()
856 old_covered_state = has->covered_end_pfn; in handle_pg_range()
858 if (start_pfn < has->ha_end_pfn) { in handle_pg_range()
864 pgs_ol = has->ha_end_pfn - start_pfn; in handle_pg_range()
868 has->covered_end_pfn += pgs_ol; in handle_pg_range()
878 if (start_pfn > has->start_pfn && in handle_pg_range()
880 hv_bring_pgs_online(has, start_pfn, pgs_ol); in handle_pg_range()
883 if (has->ha_end_pfn < has->end_pfn && pfn_cnt > 0) { in handle_pg_range()
891 size = (has->end_pfn - has->ha_end_pfn); in handle_pg_range()
898 hv_mem_hot_add(has->ha_end_pfn, size, pfn_cnt, has); in handle_pg_range()
905 res = has->covered_end_pfn - old_covered_state; in handle_pg_range()
934 * If the host has specified a hot-add range; deal with it first. in process_hot_add()
988 * The host has not specified the hot-add region. in hot_add_req()
1005 * The result field of the response structure has the in hot_add_req()
1167 * If the last post time that we sampled has changed, in post_status()
2015 struct hv_hotadd_state *has, *tmp; in balloon_remove() local
2030 * call has failed and some cleanup has been done as in balloon_remove()
2043 list_for_each_entry_safe(has, tmp, &dm->ha_region_list, list) { in balloon_remove()
2044 list_for_each_entry_safe(gap, tmp_gap, &has->gap_list, list) { in balloon_remove()
2048 list_del(&has->list); in balloon_remove()
2049 kfree(has); in balloon_remove()