[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v3 19/19] xen/arm: mm: Re-implement setup_frame_table_mappings() with map_pages_to_xen()
Hi Stefano, On 06/04/2022 01:01, Stefano Stabellini wrote: On Mon, 21 Feb 2022, Julien Grall wrote:frametable_base_pdx = mfn_to_pdx(maddr_to_mfn(ps)); /* Round up to 2M or 32M boundary, as appropriate. */ frametable_size = ROUNDUP(frametable_size, mapping_size); base_mfn = alloc_boot_pages(frametable_size >> PAGE_SHIFT, 32<<(20-12));-#ifdef CONFIG_ARM_64- /* Compute the number of second level pages. */ - nr_second = ROUNDUP(frametable_size, FIRST_SIZE) >> FIRST_SHIFT; - second_base = alloc_boot_pages(nr_second, 1); - second = mfn_to_virt(second_base); - for ( i = 0; i < nr_second; i++ ) - { - clear_page(mfn_to_virt(mfn_add(second_base, i))); - pte = mfn_to_xen_entry(mfn_add(second_base, i), MT_NORMAL); - pte.pt.table = 1; - write_pte(&xen_first[first_table_offset(FRAMETABLE_VIRT_START)+i], pte); - } - create_mappings(second, 0, mfn_x(base_mfn), frametable_size >> PAGE_SHIFT, - mapping_size); -#else - create_mappings(xen_second, FRAMETABLE_VIRT_START, mfn_x(base_mfn), - frametable_size >> PAGE_SHIFT, mapping_size); -#endif + rc = map_pages_to_xen(FRAMETABLE_VIRT_START, base_mfn, + frametable_size >> PAGE_SHIFT, PAGE_HYPERVISOR_RW);Doesn't it need to be PAGE_HYPERVISOR_RW | _PAGE_BLOCK ? You are right. Otherwise, it would only use small pages. I will fix it in the next version. Cheers, -- Julien Grall
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |