From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH v5 1/3] x86/viridian: Re-purpose the HVM parameter to be a feature mask Date: Tue, 26 Aug 2014 21:24:00 +0100 Message-ID: <1409084640.28009.31.camel@citrix.com> References: <1407244035-25977-1-git-send-email-paul.durrant@citrix.com> <1407244035-25977-2-git-send-email-paul.durrant@citrix.com> <21482.12783.610544.864097@mariner.uk.xensource.com> <9AAE0902D5BC7E449B7C8E4E778ABCD042591F@AMSPEX01CL01.citrite.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <9AAE0902D5BC7E449B7C8E4E778ABCD042591F@AMSPEX01CL01.citrite.net> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Paul Durrant Cc: Ian Jackson , Stefano Stabellini , "Keir (Xen.org)" , Jan Beulich , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org On Wed, 2014-08-13 at 12:09 +0100, Paul Durrant wrote: > > -----Original Message----- > > From: Ian Jackson [mailto:Ian.Jackson@eu.citrix.com] > > Sent: 12 August 2014 16:26 > > To: Paul Durrant > > Cc: xen-devel@lists.xen.org; Keir (Xen.org); Jan Beulich; Ian Campbell; > > Stefano Stabellini > > Subject: Re: [PATCH v5 1/3] x86/viridian: Re-purpose the HVM parameter to > > be a feature mask > > > > Paul Durrant writes ("[PATCH v5 1/3] x86/viridian: Re-purpose the HVM > > parameter to be a feature mask"): > > > The viridian option in xl.cfg(5) has also been changed to a string list so > > > that the sets can be individually sepcified. For compatibility, if the > > > option is specified as a boolean, then a true (1) value will be translated > > > to a string list containing "base" and "freq". > > > > This is correct, I think. But the libxl API should be in numbers, not > > a string list. Text to string conversion should be done in xl, not > > libxl. > > > > I think that these flag values ought to be represented in the IDL, so > > that text-to-string conversion can be done automatically. > > > > I looked at the existing IDL definitions and there don't seem to be > > any flags of this kind. So I think this will involve a inventing new > > kind of IDL type. It might be possible to adapt Enumeration. It > > might be enough simply to provide a way to make an Enumeration whose > > corresponding typedef is to a uint32_t. > > > > Does this make any kind of sense ? > > > > Yes, it does. I guess what we really want is an 'enumeration list' > then - i.e. strings get translated via enumeration and then > concatenated into a list. Is there any precedent for such a thing? For singleton enums there is, but not for lists of such things. I don't think. But isn't what you actually want here a struct viridian-ish thing containing a bunch of (def)bools, one per fearture? That would seem like a more natural interface for a libxl app (a list of VIRIDIAN_FEATURE_X, VIRIDIAN_FEATURE_Y doesn't seem quite right to me). Ian.