From: Stefano Stabellini Subject: Re: xen/arm: domheap mappings can have avail > 0 Date: Thu, 4 Apr 2013 11:47:06 +0100 Message-ID: References: <20130404091628.GB42936@ocelot.phlegethon.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20130404091628.GB42936@ocelot.phlegethon.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: Tim Deegan Cc: Julien Grall , Tim Deegan , "xen-devel@lists.xensource.com" , Ian Campbell , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org On Thu, 4 Apr 2013, Tim Deegan wrote: > At 17:57 +0100 on 01 Apr (1364839020), Stefano Stabellini wrote: > > We use 2 MB slots to map domain pages. As a consequence one slot can be > > used for more than one 4k page mapping. > > > > Change the ASSERT to reflect that. > > But it already does -- AFAICT this patch has no effect. > Yes, you are right, sorry > > > Signed-off-by: Stefano Stabellini > > > > diff --git a/xen/arch/arm/mm.c b/xen/arch/arm/mm.c > > index ae0394c..03e9083 100644 > > --- a/xen/arch/arm/mm.c > > +++ b/xen/arch/arm/mm.c > > @@ -216,7 +216,7 @@ void unmap_domain_page(const void *va) > > local_irq_save(flags); > > > > ASSERT(slot >= 0 && slot < DOMHEAP_ENTRIES); > > - ASSERT(map[slot].pt.avail != 0); > > + ASSERT(map[slot].pt.avail > 0); > > > > map[slot].pt.avail--; > > > > @@ -230,7 +230,7 @@ unsigned long domain_page_map_to_mfn(const void *va) > > unsigned long offset = ((unsigned long)va>>THIRD_SHIFT) & LPAE_ENTRY_MASK; > > > > ASSERT(slot >= 0 && slot < DOMHEAP_ENTRIES); > > - ASSERT(map[slot].pt.avail != 0); > > + ASSERT(map[slot].pt.avail > 0); > > > > return map[slot].pt.base + offset; > > } > > > > _______________________________________________ > > Xen-devel mailing list > > Xen-devel@lists.xen.org > > http://lists.xen.org/xen-devel >