From: Ian Campbell Subject: Re: [PATCH 2/5] xen: arm: Handle 4K aligned hypervisor load address. Date: Wed, 16 Jul 2014 17:53:19 +0100 Message-ID: <1405529599.1087.85.camel@kazak.uk.xensource.com> References: <1405355930.31863.5.camel@kazak.uk.xensource.com> <1405355950-6461-2-git-send-email-ian.campbell@citrix.com> <53C69D28.9090700@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <53C69D28.9090700@linaro.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Julien Grall Cc: stefano.stabellini@eu.citrix.com, tim@xen.org, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Wed, 2014-07-16 at 16:41 +0100, Julien Grall wrote: > > + /* Identity map clashes with boot_third, which we cannot handle yet */ > > + PRINT("Unable to build boot page tables - virt and phys addresses clash.\r\n") > > + b fail > > AFAIU, this can happen if the kernel is loaded around 2MB in the memory, > right? Yes from 2MB up to (but not including) 4MB. It is an error (I think) that this patch bugs if Xen is loaded at exactly 2MB, since then the virtual and identity-physical mappings are the same. > Also what does prevent Xen to be shared between 2 third page table? This is the virtual mapping, which always starts at exactly 2MB, so that can only happen if Xen is larger than 2MB, which we assume is not the case both here and in various bits of the C code start of day relocating/setup etc. > I would use PAGE_SIZE or THIRD_SIZE here. Ack > > + add r1, r1, #8 /* Next slot */ > > + cmp r1, #(512*8) > > Any reason to not use LPAE_ENTRIES here? I meant to come back and fix this and forgot. Ian.