From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olaf Hering Subject: Re: [PATCH 07/16] xenpaging: populate only paged-out pages Date: Wed, 10 Nov 2010 09:37:35 +0100 Message-ID: <20101110083735.GA4427@aepfle.de> References: <20101102223010.603002116@aepfle.de> <20101102223013.193448172@aepfle.de> <19665.22499.347592.712902@mariner.uk.xensource.com> <20101109104039.GA20253@aepfle.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Return-path: Content-Disposition: inline In-Reply-To: <20101109104039.GA20253@aepfle.de> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Ian Jackson Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On Tue, Nov 09, Olaf Hering wrote: > The other thing is that p2m_mem_paging_populate must only invalidate the > mfn if either the page is still in the process of being paged out, or if > the page is already in the process of being paged in. The latter does > not happen right now. The result is that the page may have state > p2m_ram_paging_in and a new valid mfn. Then that new mfn is invalidated, > the gfn content in the xenpaging process was already overwritten and > there is no wakeup of the vcpu. This situation is not recoverable. > p2m.c:p2m_mem_paging_populate needs a change to no call set_p2m_entry if > the p2mt state is already p2m_ram_paging_in And even this is not perfect. p2m_mem_paging_populate() could be called again even if the p2m state was just set to p2m_ram_rw in p2m_mem_paging_resume(). In this case the thread who calls p2m_mem_paging_populate() cant make any progress anymore. So in the end, p2m_mem_paging_populate() can only invalidate the mfn if the p2mt happens to be p2m_ram_paged. Olaf