From: Ian Campbell Subject: Re: PVH: domain creations... Date: Wed, 21 Nov 2012 10:50:30 +0000 Message-ID: <1353495030.13542.112.camel@zakaz.uk.xensource.com> References: <20121120182636.3879564a@mantra.us.oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20121120182636.3879564a@mantra.us.oracle.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: Mukesh Rathor Cc: "Xen-devel@lists.xensource.com" , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org On Wed, 2012-11-21 at 02:26 +0000, Mukesh Rathor wrote: > Hi guys, > > Good news, I got everything working on my refreshed tree. So, now time > to clean up the patch, look at the fixme's/TBDs to see what needs to be > done in phase I and what can be deferred. Lets start with domain > creation: > > I currently have following for domain creation: > dom0: dom0pvh in the command line makes it PVH mode. IMO, we should leave > this as is until PVH is default. > > domU: vm.cfg has line: is_pvh = 1. The tools then parse this and set > is_pvh fields in libxl_domain_create_info{} and > libxl_domain_build_info{}. I also introduced XEN_DOMCTL_CDF_pvh_guest > flag to send down the info to xen during domU creation. > > > 1. I suppose in XEN_DOMCTL_createdomain in xen: I could just see if > it's PV guest with HAP, ie, > if (~XEN_DOMCTL_CDF_hvm_guest && XEN_DOMCTL_CDF_hap) > then domcr_flags |= DOMCRF_pvh; > > This would result in elimination of XEN_DOMCTL_CDF_pvh_guest flag. > What do you think? Seems to make sense. And this interface is a hyp<=>tools one so we can always fix it or change it if necessary. (one thought for the future would be to include the kernels feature flags in struct xen_domctl_createdomain, for example) > 2. I suppose I could undo flags in libxl_domain_create_info and > libxl_domain_build_info, and just call xc_dom_feature_translated() > and assume it's PVH if it returns true for PV? I think you actually want both, i.e. libxl/libxc should provide a sensible default (perhaps based on xc_dom_feature_translated as you suggest) but you also want a way for the user to forcibly enable or disable it in the guest config (to workaround bugs, allow comparative benchmarks etc). > Also, I realized SIF_IS_PVH is probably not needed and I'm trying to > see if I can remove it. Cool. Ian.