From: Ian Campbell Subject: Re: [PATCH 4/5] xen: arm: avoid unnecessary aliasing in boot page tables. Date: Thu, 17 Jul 2014 12:37:39 +0100 Message-ID: <1405597059.29996.11.camel@kazak.uk.xensource.com> References: <1405355930.31863.5.camel@kazak.uk.xensource.com> <1405355950-6461-4-git-send-email-ian.campbell@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1405355950-6461-4-git-send-email-ian.campbell@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: xen-devel@lists.xen.org Cc: julien.grall@linaro.org, tim@xen.org, stefano.stabellini@eu.citrix.com List-Id: xen-devel@lists.xenproject.org On Mon, 2014-07-14 at 17:39 +0100, Ian Campbell wrote: > If the identity map is created at one level then avoid creating > entries further down the boot page tables, since these will be aliases > at strange virtual address Julien asked me what this meant IRL but it's easier to explain with an written example I think. Consider an arm32 system (for simplicity) with Xen loaded at address 0x40402000. As a virtual address this corresponds to walking offsets 1, 2 and 2 at the first, second and third levels respectively. When creating the identity map we will therefore create a 1GB super mapping at 0x40000000 for the identity map, which is the one we want to use. However when considering the second level we will see the offset 2 and create a 2MB mapping in slot 2 of boot_second. Since boot_second is mapped in slot 0 of boot_first this corresponds to an unwanted mapping from virtual address 0x00400000 to physical address 0x40400000. Hope that clears things up. Ian.