From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefano Stabellini Subject: Re: [PATCH 3/4] xen/arm: create_p2m_entries should not call free_domheap_page Date: Fri, 13 Jul 2012 16:45:37 +0100 Message-ID: References: <1341399934-31494-3-git-send-email-stefano.stabellini@eu.citrix.com> <20120712120901.GG89265@ocelot.phlegethon.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20120712120901.GG89265@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: "xen-devel@lists.xensource.com" , Ian Campbell , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org On Thu, 12 Jul 2012, Tim Deegan wrote: > At 12:05 +0100 on 04 Jul (1341403533), Stefano Stabellini wrote: > > The guest is entitled to use valid memory pages as pfns for grant_table > > usage. > > > > In these cases we shouldn't call free_domheap_page to free the existing > > page from create_p2m_entries, because it resets the reference counting > > but the page is still allocated to the guest (even if not in the p2m > > anymore) and common grant_table code is also going to call put_page on > > it. > > Does this break other users? I don't think so, unless we start calling map_mmio_regions passing valid memory addresses in construct_dom0. > I guess this answers my earlier question > about needing refcounts, anyway -- we'll need to use them everywhere > to keep the grant-table code consistent. Yeah