From: Ian Campbell Subject: Re: [PATCH RFC 7/9] xen: arm: handle variable p2m levels in apply_p2m_changes Date: Thu, 4 Sep 2014 15:01:28 +0100 Message-ID: <1409839288.10156.12.camel@kazak.uk.xensource.com> References: <3ef2b68c511f3e31de409b76757b95c78b99d750.1406728037.git.ian.campbell@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Vijay Kilari Cc: Stefano Stabellini , Tim Deegan , Julien Grall , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org (sorry for the delay replying) On Tue, 2014-08-26 at 14:41 +0530, Vijay Kilari wrote: > On Mon, Aug 11, 2014 at 12:30 PM, Vijay Kilari wrote: > > On Wed, Jul 30, 2014 at 7:17 PM, Ian Campbell wrote: > >> @@ -726,9 +699,27 @@ static int apply_p2m_changes(struct domain *d, > >> > >> spin_lock(&p2m->lock); > >> > >> + if ( P2M_ROOT_PAGES == 1 ) > >> + { > >> + /* Static mapping. P2M_ROOT_PAGES > 1 are handled below */ > >> + mappings[P2M_ROOT_LEVEL] = __map_domain_page(p2m->root); > >> + { > >> + rc = -EINVAL; > > Commenting below lines of code, where forcibly jumping to out if > P2M_ROOT_PAGES==1 > I could boot my system with 48-bit PA > > mappings[P2M_ROOT_LEVEL] = __map_domain_page(p2m->root); > /*{ > printk("In %s line %d\n",__func__, __LINE__); > rc = -EINVAL; > goto out; > }*/ Yeah, that block was totally bogus, not sure what I was thinking! I suspect I meant to put an "if (!mappings[P2M_ROOT_LEVEL])" before it but forget (or lost it during a rebase somehow), but as Julien points out elsewhere map_domain_page cannot fail, so I've just nuked it like you did. Ian.