Ejemplo n.º 1
0
void __init xen_vmalloc_p2m_tree(void)
{
    static struct vm_struct vm;
    unsigned long p2m_limit;

    p2m_limit = (phys_addr_t)P2M_LIMIT * 1024 * 1024 * 1024 / PAGE_SIZE;
    vm.flags = VM_ALLOC;
    vm.size = ALIGN(sizeof(unsigned long) * max(xen_max_p2m_pfn, p2m_limit),
                    PMD_SIZE * PMDS_PER_MID_PAGE);
    vm_area_register_early(&vm, PMD_SIZE * PMDS_PER_MID_PAGE);
    pr_notice("p2m virtual area at %p, size is %lx\n", vm.addr, vm.size);

    xen_max_p2m_pfn = vm.size / sizeof(unsigned long);

    xen_rebuild_p2m_list(vm.addr);

    xen_p2m_addr = vm.addr;
    xen_p2m_size = xen_max_p2m_pfn;

    xen_inv_extra_mem();
}
Ejemplo n.º 2
0
void __init xen_vmalloc_p2m_tree(void)
{
	static struct vm_struct vm;

	vm.flags = VM_ALLOC;
	vm.size = ALIGN(sizeof(unsigned long) * xen_max_p2m_pfn,
			PMD_SIZE * PMDS_PER_MID_PAGE);
	vm_area_register_early(&vm, PMD_SIZE * PMDS_PER_MID_PAGE);
	pr_notice("p2m virtual area at %p, size is %lx\n", vm.addr, vm.size);

	xen_max_p2m_pfn = vm.size / sizeof(unsigned long);

	xen_rebuild_p2m_list(vm.addr);

	xen_p2m_addr = vm.addr;
	xen_p2m_size = xen_max_p2m_pfn;

	xen_inv_extra_mem();

	m2p_override_init();
}