From: Ian Campbell Subject: Re: [PATCH v3 07/13] xen/arm: compile and initialize vmap Date: Fri, 26 Apr 2013 14:21:11 +0100 Message-ID: <1366982471.3142.94.camel@zakaz.uk.xensource.com> References: <1366830463-12153-7-git-send-email-stefano.stabellini@eu.citrix.com> <1366886475.20256.473.camel@zakaz.uk.xensource.com> <1366966841.3142.39.camel@zakaz.uk.xensource.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: Stefano Stabellini Cc: Julien Grall , "Keir (Xen.org)" , "xen-devel@lists.xensource.com" , "Tim (Xen.org)" , Jan Beulich List-Id: xen-devel@lists.xenproject.org On Fri, 2013-04-26 at 13:02 +0100, Stefano Stabellini wrote: > On Fri, 26 Apr 2013, Ian Campbell wrote: > > > > Isn't it a bug for the third to be already mapped? that suggests > > > > something is overwriting the mapping, does vmap do that? > > > > > > I don't know, but I thought that this function should be able to handle > > > that case. > > > > At the vmap layer I think it must always be a bug for it to be trying to > > replace a mapping, the API simply doesn't allow for the possibility. > > Empirical tests give evidence to the contrary: vmap does replace > mappings. Empirical test == map, unmap, map, where the second map uses the same address space as the first? vunmap is: void vunmap(const void *va) { unsigned long addr = (unsigned long)va; destroy_xen_mappings(addr, addr + PAGE_SIZE * vm_size(va)); vm_free(va); } are you sure our destroy_xen_mappings isn't buggy? Ian.