From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Vrabel Subject: Re: [Xen-devel] [PATCH v3 1/2] xen/balloon: set a mapping for ballooned out pages Date: Wed, 24 Jul 2013 18:37:35 +0100 Message-ID: <51F010DF.60204@cantab.net> References: <1374600466-3229-1-git-send-email-stefano.stabellini@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1374600466-3229-1-git-send-email-stefano.stabellini@eu.citrix.com> Sender: linux-kernel-owner@vger.kernel.org To: Stefano Stabellini Cc: xen-devel@lists.xensource.com, ian.campbell@citrix.com, linux-kernel@vger.kernel.org, alex@alex.org.uk, dcrisan@flexiant.com List-Id: xen-devel@lists.xenproject.org On 23/07/13 18:27, Stefano Stabellini wrote: > Currently ballooned out pages are mapped to 0 and have INVALID_P2M_ENTRY > in the p2m. These ballooned out pages are used to map foreign grants > by gntdev and blkback (see alloc_xenballooned_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). Reviewed-by: David Vrabel A number of users of DEFINE_PER_CPU() initialize it with for_each_possible_cpu() without registering a cpu notifier, so I think there is no risk that offlining a CPU clears its per-cpu data and the code as-is is fine. David