From: Tim Deegan Subject: Re: xen/arm: domheap mappings can have avail > 0 Date: Thu, 4 Apr 2013 10:16:28 +0100 Message-ID: <20130404091628.GB42936@ocelot.phlegethon.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline 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: Stefano Stabellini Cc: Julien Grall , xen-devel@lists.xensource.com, Ian Campbell , Tim Deegan List-Id: xen-devel@lists.xenproject.org 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. Tim. > 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