From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mukesh Rathor Subject: Re: [V2 PATCH 2/4] PVH xen tools: libxc changes to build a PVH guest. Date: Mon, 9 Sep 2013 18:40:14 -0700 Message-ID: <20130909184014.44351be7@mantra.us.oracle.com> References: <1378513717-11525-1-git-send-email-mukesh.rathor@oracle.com> <1378513717-11525-3-git-send-email-mukesh.rathor@oracle.com> <1378716166.19967.8.camel@kazak.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1VJCwM-0003gr-Q6 for xen-devel@lists.xenproject.org; Tue, 10 Sep 2013 01:40:26 +0000 In-Reply-To: <1378716166.19967.8.camel@kazak.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: Ian Campbell Cc: xen-devel@lists.xenproject.org, Ian.Jackson@eu.citrix.com, "stefano.stabellini@eu.citrix.com" List-Id: xen-devel@lists.xenproject.org On Mon, 9 Sep 2013 09:42:46 +0100 Ian Campbell wrote: > On Fri, 2013-09-06 at 17:28 -0700, Mukesh Rathor wrote: > > V2: Make pvh_features string const, and fail 32bit PVH guest > > creation. Move PVH check to xc_dom_gnttab_init(). > > Please put these intra-version changelogs after the S-o-b and a "---" > tag on a line by itself. Ok. > > --- a/tools/libxc/xc_dom.h > > +++ b/tools/libxc/xc_dom.h > > @@ -130,6 +130,7 @@ struct xc_dom_image { > > domid_t console_domid; > > domid_t xenstore_domid; > > xen_pfn_t shared_info_mfn; > > + int pvh_enabled; > > > > xc_interface *xch; > > domid_t guest_domid; > > diff --git a/tools/libxc/xc_dom_boot.c b/tools/libxc/xc_dom_boot.c > > index d4d57b4..73032a1 100644 > > --- a/tools/libxc/xc_dom_boot.c > > +++ b/tools/libxc/xc_dom_boot.c > > @@ -416,6 +416,10 @@ int xc_dom_gnttab_hvm_seed(xc_interface *xch, > > domid_t domid, > > int xc_dom_gnttab_init(struct xc_dom_image *dom) > > { > > + /* PVH sets up its own grant during boot via hvm mechanisms */ > > Last time I saw this I took this to mean that it uses the HVM init > mechanisms in the toolstack, but from the context below I now see this > isn't correct and it actually defers this entirely to the guest. > > Why isn't it ok to call something similar to xc_dom_gnttab_hvm_seed > here? That functionality is there to support disaggregated xenstored > by allowing us to preseed grant entries for the xenstore domain to > access the domains xenstore ring. Likewise for the console ring. > > It's failure to do this which necessitates your fourth patch, but even > with that patch xenstore dmains will be broken. Stefano had suggested keeping this change even if not needed, as it provides a good fallback mechanism. I can drop the patch, lmk. > Note that this code fills in grant table entries but does not leave > them mapped for the guest to access (it maps them temporarily and then > unmaps), so calling xc_dom_gnttab_hvm_seed is not contrary to allowing > the guest to setup its own grant during boot. Correct, looks like xc_dom_gnttab_hvm_seed() would work for PVH at first glance. thanks Mukesh