From: Ian Campbell Subject: Re: [PATCH] xen: arm: setup sane EL1 state while building domain 0. Date: Tue, 18 Mar 2014 09:41:05 +0000 Message-ID: <1395135665.12847.5.camel@kazak.uk.xensource.com> References: <1395070269-32356-1-git-send-email-ian.campbell@citrix.com> <5327BC08.9050003@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <5327BC08.9050003@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: Fu Wei Cc: stefano.stabellini@eu.citrix.com, tim@xen.org, julien.grall@linaro.org, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Tue, 2014-03-18 at 11:22 +0800, Fu Wei wrote: > On 03/17/2014 11:31 PM, Ian Campbell wrote: > > The address translation functions used while building dom0 rely on certain EL1 > > state being configured. In particular they are subject to the behaviour of > > SCTLR_EL1.M (stage 1 MMU enabled). > > > > The Xen (and Linux) boot protocol require that the kernel be entered with the > > MMU disabled but they don't say anything explicitly about exception levels > > other than the one which is active when entering the kernels. Arguably the > > protocol could be said to apply to all exception levels but in any case we > > should cope with this and setup the EL1 state as necessary. > > > > Fu Wei discovered this when booting Xen from grub.efi over UEFI, it's not > > clear whether grub or UEFI is responsible for leaving stage 1 MMU enabled. > > > > Reported-by: Fu Wei > > Signed-off-by: Ian Campbell > > Cc: Fu Wei > > --- > > Fu Wei, can I add your Tested-by here? > > Yes, Thanks! > I have tested this with my GRUB binary, it works fine. Great. Thanks. It looks like we might rework the approach, if so I'll CC you on that as well (or Julien will). Are you also going to change grub to leave EL1 in a known good state? Ian.