|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v9 1/2] x86/viridian: Re-purpose the HVM parameter to be a feature mask
On Wed, 2014-09-03 at 17:26 +0100, Ian Jackson wrote:
> Paul Durrant writes ("[PATCH v9 1/2] x86/viridian: Re-purpose the HVM
> parameter to be a feature mask"):
> > The following commits introduced the time reference counter MSR and
> > TSC/APIC frequency MSRs into the viridian feature set respectively:
> ...
> > 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".
>
> We had a conversation on IRC about the API. See below.
>
> For libxl I think this means:
>
> - Keep the existing flag
>
> - Introduce two new bitmaps called something like
> viridian_features_{enable,disable}
Of type libxl_bitmap or uintN? (if the former then some sort of #define
for the maximum feature will be needed, I think, but it would let you
use libxl_bitmap_set_any/none which might be handy.
> - Features actually enabled are
> !defbool_value(viridian) ? 0 :
> ((viridian_features_enable | default) & ~viridian_features_disable)
>
> The feature bits would be provided via a libxl enum either specified
> with values 1,2,4 etc. or (better) with a new `shifted' property.
>
> For xl I would suggest:
>
> Keep the existing config name and do not introduce any new variables.
>
> Existing values 0 and 1 (or false and true) mean `enable, defaults'.
Presumably you mean that 0/false means disable all?
> Alternatively user can specify comma-separated list of {feature
> name, or `all'} each optionally preceded by `!'. That means
> `enable, adjust feature set accordingly'.
This suggests that it would be convenient to go the `shifted property'
route in the IDL, since that would let applications use
libxl_viridian_feature_from_string("somefeature"), whereas bodging it
with an enum containing somefeature_shifted would require you to use
libxl_viridian_feature_from_string("somefeature-shifted") (presumably by
munging in xl rather than forcing the user to say this...)
Ian.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |