From: Ian Campbell Subject: Re: [PATCH v3 05/11] arm: shared_info page allocation and mapping Date: Fri, 25 May 2012 14:58:40 +0100 Message-ID: <1337954320.22311.36.camel@zakaz.uk.xensource.com> References: <1330698457-8622-5-git-send-email-stefano.stabellini@eu.citrix.com> <1331717930.23971.341.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: "xen-devel@lists.xensource.com" , David Vrabel , "Tim Deegan (3P)" List-Id: xen-devel@lists.xenproject.org On Fri, 2012-05-25 at 14:54 +0100, Stefano Stabellini wrote: > On Wed, 14 Mar 2012, Ian Campbell wrote: > > On Fri, 2012-03-02 at 14:27 +0000, Stefano Stabellini wrote: > > > @@ -118,7 +118,12 @@ static int create_p2m_entries(struct domain *d, > > > } > > > /* else: third already valid */ > > > > > > - BUG_ON(third[third_table_offset(addr)].p2m.valid); > > > + if ( third[third_table_offset(addr)].p2m.valid ) > > > + { > > > + /* p2m entry already present */ > > > + free_domheap_page( > > > + mfn_to_page(third[third_table_offset(addr)].p2m.base)); > > > + } > > > > If there was already an entry here don't we need to do something with > > whatever it points to? Either free it or deref or something? > > We are already doing something: we are free'ing the old page. There is > no need to do anything to the p2m entry because it is going to be > overwritten by the new one few lines below. I honestly have no idea WTF I was talking about... Ian.