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:28:30 +0100 Message-ID: <1409084910.28009.33.camel@citrix.com> References: <1407244035-25977-1-git-send-email-paul.durrant@citrix.com> <1407244035-25977-2-git-send-email-paul.durrant@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1407244035-25977-2-git-send-email-paul.durrant@citrix.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: Paul Durrant Cc: Ian Jackson , Stefano Stabellini , Keir Fraser , Jan Beulich , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Tue, 2014-08-05 at 14:07 +0100, Paul Durrant wrote: Sorry for the delay replying, I've been on vacation and travelling. > diff --git a/tools/libxl/libxl_types.idl b/tools/libxl/libxl_types.idl > index a412f9c..6c5d7e0 100644 > --- a/tools/libxl/libxl_types.idl > +++ b/tools/libxl/libxl_types.idl > @@ -363,7 +363,7 @@ libxl_domain_build_info = Struct("domain_build_info",[ > ("acpi_s3", libxl_defbool), > ("acpi_s4", libxl_defbool), > ("nx", libxl_defbool), > - ("viridian", libxl_defbool), > + ("viridian", libxl_string_list), Unfortunately this will break the API. specifically existing apps which call libxl_defbool_set on this field will now get a type error. You need to keep the existing viridian field and add a new one with the new semantics and a new name (e.g. viridian_features, or a set of new defbools as I suggested in my previous mail) and define the precedence. See usbdevice vs. usbdevice_list or the (very new) serial one for existing examples of this sort of thing. For your case though you could continue to treat the viridian defbool as a gate on a bunch of viridian_feature_X defbools, IOW if viridian == false the others are ignored, if it is true then the others have the usual defbool behaviour of defaults and overrides. I think that would fall out fairly naturally in the setdefault function. Ian.