From: Ian Campbell Subject: Re: [PATCH v4 7/8] xen: arm: use superpages in p2m when pages are suitably aligned Date: Wed, 2 Jul 2014 09:46:27 +0100 Message-ID: <1404290787.26896.40.camel@kazak.uk.xensource.com> References: <1404202883.1829.125.camel@dagon.hellion.org.uk> <1404203222-30111-7-git-send-email-ian.campbell@citrix.com> <53B2B554.7090709@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <53B2B554.7090709@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 Tue, 2014-07-01 at 14:19 +0100, Julien Grall wrote: > Hi Ian, > > On 07/01/2014 09:27 AM, Ian Campbell wrote: > > +static int p2m_create_table(struct domain *d, lpae_t *entry, > > + int level_shift, bool_t flush_cache) > > { > > struct p2m_domain *p2m = &d->arch.p2m; > > struct page_info *page; > > - void *p; > > + lpae_t *p; > > lpae_t pte; > > + int splitting = entry->p2m.valid; > > NIT: You've introduced p2m_valid earlier. I think you can use it here. > > > > > - BUG_ON(entry->p2m.valid); > > + BUG_ON(entry->p2m.table); > > I though I've asked it before. Yes I remember seeing that now, but somehow the mail didn't end up in my archive of the previous thread so I forgot about it, sorry. > Should not you check the valid bit by > using p2m_table? I'll have to think but my first thought is yes. Ian.