From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH v5 0/9] toolstack-based approach to pvhvm guest kexec Date: Tue, 13 Jan 2015 12:18:20 +0000 Message-ID: <1421151500.19103.47.camel@citrix.com> References: <1418305541-5135-1-git-send-email-vkuznets@redhat.com> <20150105124648.GF24360@zion.uk.xensource.com> <87r3v9pekz.fsf@vitty.brq.redhat.com> <20150107091057.GA12049@aepfle.de> <54AD0D53.6030209@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YB0QU-000512-Th for xen-devel@lists.xenproject.org; Tue, 13 Jan 2015 12:18:27 +0000 In-Reply-To: <54AD0D53.6030209@citrix.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: David Vrabel Cc: Olaf Hering , Wei Liu , Stefano Stabellini , Andrew Cooper , Julien Grall , Ian Jackson , Andrew Jones , Tim Deegan , Jan Beulich , xen-devel@lists.xenproject.org, Vitaly Kuznetsov , Keir Fraser List-Id: xen-devel@lists.xenproject.org On Wed, 2015-01-07 at 10:41 +0000, David Vrabel wrote: > On 07/01/15 09:10, Olaf Hering wrote: > > On Mon, Jan 05, Vitaly Kuznetsov wrote: > > > >> Wei Liu writes: > >> > >>> Olaf mentioned his concern about handling ballooned pages in > >>> <20141211153029.GA1772@aepfle.de>. Is that point moot now? > >> > >> Well, the limitation is real and some guest-side handling will be > >> required in case we want to support kexec with ballooning. But as David > >> validly mentioned "It's the responsibility of the guest to ensure it > >> either doesn't kexec when it is ballooned or that the kexec kernel can > >> handle this". Not sure if we can (and need to) do anything hypevisor- or > >> toolstack-side. > > > > One approach would be to mark all pages as some sort of > > populate-on-demand first. Then copy the existing assigned pages from > > domA to domB and update the page type. The remaining pages are likely > > ballooned. Once the guest tries to access them this should give the > > hypervisor and/or toolstack a chance to assign a real RAM page to them. > > > > I mean, if a host-assisted approach for kexec is implemented then this > > approach must also cover ballooning. > > It is not possible for the hypervisor or toolstack to do what you want > because there may not be enough free memory to repopulate the new domain. > > The guest can handle this by: > > 1. Not ballooning (this is common in cloud environments). > 2. Reducing the balloon prior to kexec. > 3. Running the kexec'd image in a reserved chunk of memory (the crash > kernel case). > 4. Providing balloon information to the kexec'd image. Is #4 not just some sort of special case of "provide a memory map to the kexec'd kernel"? I suppose it's significantly more fine grained and therefore doesn't fit into the usual data structures which kexec might already support throwing over the fence. (Olaf's suggesting to use PoD in a different subthread was interesting too). > None of these require any additional hypervisor or toolstack support and > 1-3 are trivial for a guest to implement. > > David