From: Ian Campbell Subject: Re: [PATCH v4 06/12] xen/arm: compile and initialize vmap Date: Fri, 26 Apr 2013 17:50:07 +0100 Message-ID: <1366995007.3142.179.camel@zakaz.uk.xensource.com> References: <1366990117-8689-6-git-send-email-stefano.stabellini@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1366990117-8689-6-git-send-email-stefano.stabellini@eu.citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Stefano Stabellini Cc: Julien Grall , "xen-devel@lists.xensource.com" , "Tim (Xen.org)" List-Id: xen-devel@lists.xenproject.org On Fri, 2013-04-26 at 16:28 +0100, Stefano Stabellini wrote: > Rename EARLY_VMAP_VIRT_END and EARLY_VMAP_VIRT_START to > VMAP_VIRT_END and VMAP_VIRT_START. > > Defining VMAP_VIRT_START triggers the compilation of common/vmap.c. > > Define PAGE_HYPERVISOR and MAP_SMALL_PAGES (unused on ARM, because we > only support 4K pages so as a matter of fact it is always set). > > Implement map_pages_to_xen and destroy_xen_mappings. > > Call vm_init from start_xen. > > Changes in v4: > - remove flush_tlb_local() from create_xen_entries; Do you think the related one in create_p2m can go too? > +static int create_xen_table(lpae_t *entry) > +{ > + void *p; > + lpae_t pte; > + > + p = alloc_xenheap_pages(0, 0); You can use alloc_xenheap_page here. > + BUG_ON(!xen_second[second_linear_offset(addr)].pt.valid); > + > + third = __va((paddr_t)xen_second[second_linear_offset(addr)].pt.base > + << PAGE_SHIFT); Sometimes the cure is worse than the disease when it comes to 80 columns, and this would have been far from the longest line in this patch ;-) The cast + shift construct is available as pfn_to_paddr. Those are just nits really, if want to fix the pfn_to_paddr + alloc_xenheap_page things then: Acked-by: Ian Campbell The line length thing I'll leave to you. Ian.