From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Vrabel Subject: Re: [PATCH] xen/balloon: set ballooned out pages as invalid in p2m Date: Tue, 1 Jul 2014 15:00:16 +0100 Message-ID: <53B2BEF0.50109@citrix.com> References: <1404221868-10704-1-git-send-email-david.vrabel@citrix.com> <20140701135814.GC19711@laptop.dumpdata.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1X1ybe-0003pl-JC for xen-devel@lists.xenproject.org; Tue, 01 Jul 2014 14:00:22 +0000 In-Reply-To: <20140701135814.GC19711@laptop.dumpdata.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Konrad Rzeszutek Wilk Cc: xen-devel@lists.xenproject.org, Boris Ostrovsky List-Id: xen-devel@lists.xenproject.org On 01/07/14 14:58, Konrad Rzeszutek Wilk wrote: > On Tue, Jul 01, 2014 at 02:37:48PM +0100, David Vrabel wrote: >> Since cd9151e26d31048b2b5e00fd02e110e07d2200c9 (xen/balloon: set a >> mapping for ballooned out pages), a ballooned out page had its entry >> in the p2m set to the MFN of one of the scratch pages. This means >> that the p2m will contain many entries pointing to the same MFN. >> >> During a domain save, these many-to-one entries are not identified as >> such and the scratch page is saved multiple times. On restore the >> ballooned pages are populated with new frames and the domain may use >> up its allocation before all pages can be restored. >> >> Set ballooned out pages as INVALID_P2M_ENTRY in the p2m (as they were >> before), preventing them from being saved and re-populated on restore. >> > > Won't that invalide the primal purpose of the scratch page code? > > That is cd9151e26d31048b2b5e00fd02e110e07d2200c9 > > xen/balloon: set a mapping for ballooned out pages > " Allocate a page per cpu and map all the ballooned out pages to the > corresponding mfn. Set the p2m accordingly. This way reading from a > ballooned out page won't cause a kernel crash (see > http://lists.xen.org/archives/html/xen-devel/2012-12/msg01154.html). > " > ? No, because we still have a virtual mapping for the ballooned out page. David