From: Tim Deegan Subject: Re: [PATCH 2 of 4 RFC] xen, pod: Check zero-check pages returned by the balloon driver Date: Thu, 14 Jun 2012 11:28:08 +0100 Message-ID: <20120614102808.GI82539@ocelot.phlegethon.org> References: <8264589787b484b7f903.1339156492@elijah> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <8264589787b484b7f903.1339156492@elijah> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: George Dunlap Cc: xen-devel@lists.xensource.com, Andres Lagar-Cavilla List-Id: xen-devel@lists.xenproject.org At 12:54 +0100 on 08 Jun (1339160092), George Dunlap wrote: > + else if( p2m_is_ram(t) ) > + { > + if ( steal_for_cache ) > + { > + struct page_info *page; > + > + ASSERT(mfn_valid(mfn)); I think this assertion is broken by the paging code, which adds paged-out pages to the RAM types. One fix is to undo that change and have p2m_is_ram() only be true for present pages, but I think for 4.2 it would be less disruptive to test here for the paged-out and paging types. Cc'ing Andres on the larger question -- do you think we can have p2m_is_ram() imply mfn_valid() again? I'm not sure whether it will make things cleaner (or at least move the burden of handling paged-out memory into the paging code) or add more boilerplate to paths where the paging will be handled after a check for p2m_os_ram(). What do you think? Cheers, Tim.