Lines Matching refs:p2m

4  * Xen leaves the responsibility for maintaining p2m mappings to the
5 * guests themselves, but it must also access and update the p2m array
8 * The logical flat p2m table is mapped to a linear kernel memory area.
18 * p2m p2m p2m ...
37 * INVALID_P2M_ENTRY. This page may be referenced multiple times in the p2m
166 static void p2m_init(unsigned long *p2m)
171 p2m[i] = INVALID_P2M_ENTRY;
174 static void p2m_init_identity(unsigned long *p2m, unsigned long pfn)
179 p2m[i] = IDENTITY_FRAME(pfn + i);
294 /* Set up p2m_top to point to the domain-builder provided p2m pages */
331 static void __init xen_rebuild_p2m_list(unsigned long *p2m)
358 * Try to map missing/identity PMDs or p2m-pages if possible.
361 * Chunk size to test is one p2m page if we are in the middle
381 /* Use initial p2m page contents. */
384 ptep = populate_extra_pte((unsigned long)(p2m + pfn));
391 /* Map complete missing or identity p2m-page. */
394 ptep = populate_extra_pte((unsigned long)(p2m + pfn));
405 (unsigned long)(p2m + pfn) + i * PMD_SIZE);
423 pr_notice("p2m virtual area at %p, size is %lx\n", vm.addr, vm.size);
525 * Fully allocate the p2m structure for a given pfn. We need to check
588 /* p2m leaf page is missing */
589 unsigned long *p2m;
591 p2m = alloc_p2m_page();
592 if (!p2m)
596 p2m_init(p2m);
598 p2m_init_identity(p2m, pfn & ~(P2M_PER_PAGE - 1));
606 pfn_pte(PFN_DOWN(__pa(p2m)), PAGE_KERNEL));
610 mid_mfn[p2m_mid_index(pfn)] = virt_to_mfn(p2m);
611 p2m = NULL;
616 if (p2m)
617 free_p2m_page(p2m);
620 /* Expanded the p2m? */
655 /* Only invalid entries allowed above the highest p2m covered frame. */
660 * The interface requires atomic updates on p2m elements.
854 debugfs_create_file("p2m", 0600, d_mmu_debug, NULL, &p2m_dump_fops);