From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mukesh Rathor Subject: Re: [PATCH 08/18] PVH xen: tools changes to create PVH domain Date: Thu, 29 Aug 2013 17:45:00 -0700 Message-ID: <20130829174500.5b63c91c@mantra.us.oracle.com> References: <1369445137-19755-1-git-send-email-mukesh.rathor@oracle.com> <1369445137-19755-9-git-send-email-mukesh.rathor@oracle.com> <1371049088.24512.450.camel@zakaz.uk.xensource.com> <20130614171437.49f55cea@mantra.us.oracle.com> <1371467494.23802.49.camel@zakaz.uk.xensource.com> <20130730164716.10969419@mantra.us.oracle.com> <1375272057.7382.24.camel@kazak.uk.xensource.com> <20130731190213.0b57efd0@mantra.us.oracle.com> <1375344091.15681.41.camel@dagon.hellion.org.uk> <20130828185152.0f7bcf8c@mantra.us.oracle.com> <1377766885.11455.15.camel@kazak.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1377766885.11455.15.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.xensource.com" , Ian Jackson List-Id: xen-devel@lists.xenproject.org On Thu, 29 Aug 2013 10:01:25 +0100 Ian Campbell wrote: > On Wed, 2013-08-28 at 18:51 -0700, Mukesh Rathor wrote: > > On Thu, 1 Aug 2013 09:01:31 +0100 > > Ian Campbell wrote: > > > > > On Wed, 2013-07-31 at 19:02 -0700, Mukesh Rathor wrote: > > > > On Wed, 31 Jul 2013 13:00:57 +0100 > > > > Ian Campbell wrote: ... > > Hmm.. the problem I am running here now is setting of PVH flag in > > xch->flags from libxl? struct xch seems to be private to libxc. > > xch is the libxc handle used by all the api calls, so it can't be > private to libxc. There is an xch inside the libxl ctx, use either > ctx->xch or CTX->xch depending on whether you have a ctx or a gc in > the function in question. > > Actually, xch->flags & PVH is not the right place. xch is a handle > onto an open libxc instance, it is not per-domain, so adding PVH to > xch->flags is wrong. Not sure how I missed that initially. > > I think you need to add the flag to the dom->flags in > libxl__build_pv. I don't think anything before the existing setting > of that field needs to know if the guest is PVH or not. The calls > between xc_dom_allocate and there are > xc_dom_(kernel|ramdisk)_(file|mem) which are just setting up internal > state and not touching the guest yet. If I'm wrong about that then I > think the block setting all of those dom->fields can be moved up. The problem is I need to tell xc_dom_allocate() it's a PVH guest somehow so it can call elf_xen_parse_features for PVH also. Since, thats not feasible, I can set the pvh flag in libxl__build_pv, and xc_dom_parse_image() can then parse PVH features by calling elf_xen_parse_features(). LMK if thats not OK. thanks Mukesh