From mboxrd@z Thu Jan 1 00:00:00 1970 From: Juergen Gross Subject: Re: [PATCH v4 1/9] libxc: reorganize domain builder guest memory allocator Date: Thu, 12 Nov 2015 13:28:11 +0100 Message-ID: <564485DB.6070909@suse.com> References: <1446734195-20257-1-git-send-email-jgross@suse.com> <1446734195-20257-2-git-send-email-jgross@suse.com> <20151112111437.GA24281@zion.uk.xensource.com> <1447327247.18450.58.camel@citrix.com> <56447802.5030001@suse.com> <20151112113246.GA28451@zion.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20151112113246.GA28451@zion.uk.xensource.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: Wei Liu Cc: roger.pau@citrix.com, xen-devel@lists.xen.org, ian.jackson@eu.citrix.com, Ian Campbell , stefano.stabellini@eu.citrix.com List-Id: xen-devel@lists.xenproject.org On 12/11/15 12:32, Wei Liu wrote: > On Thu, Nov 12, 2015 at 12:29:06PM +0100, Juergen Gross wrote: >> On 12/11/15 12:20, Ian Campbell wrote: >>> On Thu, 2015-11-12 at 11:14 +0000, Wei Liu wrote: >>>> On Thu, Nov 05, 2015 at 03:36:27PM +0100, Juergen Gross wrote: >>>>> Guest memory allocation in the domain builder of libxc is done via >>>>> virtual addresses only. In order to be able to support preallocated >>>>> areas not virtually mapped reorganize the memory allocator to keep >>>>> track of allocated pages globally and in allocated segments. >>>>> >>>>> This requires an interface change of the allocate callback of the >>>>> domain builder which currently is using the last mapped virtual >>>>> address as a parameter. This is no problem as the only user of this >>>>> callback is stubdom/grub/kexec.c using this virtual address to >>>>> calculate the last used pfn. >>>>> >>>>> Signed-off-by: Juergen Gross >>>> >>>> One question: did you test building with pygrub after this change? I >>>> think the code is correct but we'd better be sure it doesn't break >>>> pygrub. >>> >>> Did you mean pvgrub? (with a Vee) >>> >>> pygrub (with a Why) runs way before the libxc domain builder gets in on the >>> act, doesn't it. >> >> Yep. >> >> To be clear: we have: >> >> - pygrub: running on dom0, mounts the root disk and analyzes the grub >> configuration found, selects kernel and initrd and loads those via >> libxl. >> >> - pvgrub: based on grub2, is started via libxl as paravirtualized kernel >> in the new domain. pvgrub is reading the grub configuration and starts >> the appropriate kernel via it's own mechanisms (patches for support of >> huge domains are sent, no comments up to now). >> >> - stubdom based grub: subject to the patch we are discussing here. It is >> being built in my environment, but not tested up to now. >> >> > > I think we use pvgrub to denote the third case (according to our wiki). > The second case is just ... upstream grub2 with pv capability ? Urgs. Okay. Nevertheless: I've built it. :-) > (So many grubs...) I'm particularly happy you didn't come up with a variant I wasn't aware of. :-) Juergen