From: Keir Fraser Subject: Re: xenheap pages mapped by dom0 Date: Fri, 18 Dec 2009 16:03:14 +0000 Message-ID: References: <4B2B9FCB.6010309@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4B2B9FCB.6010309@eu.citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: George Dunlap Cc: "xen-devel@lists.xensource.com" , Jan Beulich List-Id: xen-devel@lists.xenproject.org On 18/12/2009 15:29, "George Dunlap" wrote: > Hmm, the first two should probably happen in the opposite order, no? > I.e., we should check to see that for each page we want to deallocate, > page->count_info & PGC_count_mask == 0, returning -EBUSY if that fails; > then unmark allocate and call free xenheap page? No, PGC_allocated holds a reference count. Reference count cannot be zero while PGC_allocated is true. -- Keir