Lines Matching full:pages
23 * mshv_region_process_chunk - Processes a contiguous chunk of memory pages
27 * @page_offset: Offset into the region's pages array to start processing.
28 * @page_count : Number of pages to process.
31 * This function scans the region's pages starting from @page_offset,
32 * checking for contiguous present pages of the same size (normal or huge).
33 * It invokes @handler for the chunk of contiguous pages found. Returns the
34 * number of pages handled, or a negative error code if the first page is
38 * pages.
40 * Return: Number of pages handled, or negative error code.
55 page = region->pages[page_offset]; in mshv_region_process_chunk()
68 page = region->pages[page_offset + count]; in mshv_region_process_chunk()
87 * mshv_region_process_range - Processes a range of memory pages in a
91 * @page_offset: Offset into the region's pages array to start processing.
92 * @page_count : Number of pages to process.
94 * pages.
96 * Iterates over the specified range of pages in @region, skipping
97 * non-present pages. For each contiguous chunk of present pages, invokes
101 * pages.
119 /* Skip non-present pages */ in mshv_region_process_range()
120 if (!region->pages[page_offset]) { in mshv_region_process_range()
167 struct page *page = region->pages[page_offset]; in mshv_region_chunk_share()
173 region->pages + page_offset, in mshv_region_chunk_share()
193 struct page *page = region->pages[page_offset]; in mshv_region_chunk_unshare()
199 region->pages + page_offset, in mshv_region_chunk_unshare()
217 struct page *page = region->pages[page_offset]; in mshv_region_chunk_remap()
225 region->pages + page_offset); in mshv_region_chunk_remap()
249 unpin_user_pages(region->pages + page_offset, page_count); in mshv_region_invalidate_pages()
251 memset(region->pages + page_offset, 0, in mshv_region_invalidate_pages()
263 struct page **pages; in mshv_region_pin() local
268 pages = region->pages + done_count; in mshv_region_pin()
275 * Pinning assuming 4k pages works for large pages too. in mshv_region_pin()
284 pages); in mshv_region_pin()
300 struct page *page = region->pages[page_offset]; in mshv_region_chunk_unmap()
331 …"Failed to regain access to memory, unpinning user pages will fail and crash the host error: %d\n", in mshv_region_destroy()
398 * @page_count: Number of pages to handle.
400 * This function resolves memory faults for a specified range of pages
402 * to fault in the required pages and updates the region's page array.
433 region->pages[page_offset + i] = hmm_pfn_to_page(pfns[i]); in mshv_region_range_fault()
453 /* Map more pages than requested to reduce the number of faults. */ in mshv_region_handle_gfn_fault()
474 * This function invalidates a memory region by remapping its pages with
480 * NOTE: Failure to invalidate a region is a serious error, as the pages will
482 * Any attempt to access such pages will likely crash the system.
524 …"Failed to invalidate region %#llx-%#llx (range %#lx-%#lx, event: %u, pages %#llx-%#llx, mm: %#llx… in mshv_region_interval_invalidate()