From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wei Liu Subject: Re: [RFC][PATCH 01/13] tools: introduce some new parameters to set rdm policy Date: Wed, 20 May 2015 09:36:45 +0100 Message-ID: <20150520083644.GV26335@zion.uk.xensource.com> References: <20150508130429.GL3848@zion.uk.xensource.com> <55503F8A.5070709@intel.com> <20150511145432.GD30997@zion.uk.xensource.com> <55555157.3000604@intel.com> <20150518191743.GJ9503@zion.uk.xensource.com> <555AAB11.3080105@intel.com> <20150519094203.GC9893@zion.uk.xensource.com> <555B1563.5000502@intel.com> <20150519110041.GB21998@zion.uk.xensource.com> <555C1B5C.7070401@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <555C1B5C.7070401@intel.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: "Chen, Tiejun" Cc: kevin.tian@intel.com, Wei Liu , ian.campbell@citrix.com, andrew.cooper3@citrix.com, tim@xen.org, xen-devel@lists.xen.org, stefano.stabellini@citrix.com, JBeulich@suse.com, yang.z.zhang@intel.com, Ian.Jackson@eu.citrix.com List-Id: xen-devel@lists.xenproject.org On Wed, May 20, 2015 at 01:27:56PM +0800, Chen, Tiejun wrote: [...] > >>We have this definition, > >> > >>+libxl_rdm_reserve_type = Enumeration("rdm_reserve_type", [ > >>+ (0, "none"), > >>+ (1, "host"), > >>+ ]) > >> > >>If we set 'type=none', this means we would do nothing actually since we > >>don't expose any rdms to guest. This behavior will ensue we go back the > >>existing scenario without our patch. > >> > > > >But this only works with global configuration and individual > >configuration in PCI spec trumps this, right? > > You're right. > > > > >Think about how an old configuration migrated to newer version of Xen > >should work. For example, I don't have rdm= but have pci=['xxxx']. Do we > >need to make sure this still work? I guess the answer is if it already > > Definitely. > > >works before RDM it should continue to work as there is really no > >conflict before. In this case whether we enable RDM or not doesn't make > >a difference to a guest that's already working before. Am I right? > You haven't answered this question... I'm trying to determine what should be a sensible default value. If the answer to that question is "yes", then we should enable RDM by default, because it does no harm to guests that are already working and fix problem for the guests that are not working; if the answer is "no" or "not sure", we should use "none". Don't worry, we can change the default value later if necessary. Using "none" as default leaves us on the safe side but it would make it less nicer to use Xen. But well, safety comes first. Wei. > I think we can set the default 'type' to NONE, > > libxl__rdm_setdefault() > { > b_info->rdm.type = LIBXL_RDM_RESERVE_TYPE_NONE; > > and then, > > libxl__domain_device_construct_rdm() > { > ... > /* Might not expose rdm. */ > if (type == LIBXL_RDM_RESERVE_TYPE_NONE) > return 0; > > This means we don't expose any rdm so we would never concern any policy > anymore. > > > Thanks > Tiejun >