From: Ian Jackson Subject: Re: [PATCH v11 1/2] x86/viridian: Re-purpose the HVM parameter to be a feature mask Date: Mon, 22 Sep 2014 17:48:25 +0100 Message-ID: <21536.21209.120348.563621@mariner.uk.xensource.com> References: <1410887929-7748-1-git-send-email-paul.durrant@citrix.com> <1410887929-7748-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: <1410887929-7748-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: David Scott , Stefano Stabellini , Keir Fraser , Ian Campbell , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org Paul Durrant writes ("[PATCH v11 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 libxl and libxc parts of this, and the corresponding docs, look good to me, apart from one part that I would like Ian C to comment on - see below. If you had separated that out into a patch of its own, I would have given a tools ack to this one :-). Thanks, Ian. > tools/libxl/gentypes.py | 6 +++ ... > diff --git a/tools/libxl/gentypes.py b/tools/libxl/gentypes.py > index 3e73821..e101de4 100644 > --- a/tools/libxl/gentypes.py > +++ b/tools/libxl/gentypes.py > @@ -564,6 +564,8 @@ if __name__ == '__main__': ... > + f.write("%s %s_min_val = %d;\n" % (ty.typename, ty.typename, ty.min)) > + f.write("%s %s_max_val = %d;\n" % (ty.typename, ty.typename, ty.max)) > + f.write("\n") > + ... > diff --git a/tools/libxl/idl.py b/tools/libxl/idl.py > index 437049e..983253d 100644 > --- a/tools/libxl/idl.py > +++ b/tools/libxl/idl.py > @@ -174,9 +174,15 @@ class Enumeration(Type): > self.namespace) > > self.values = [] > + self.min = sys.maxint > + self.max = -sys.maxint - 1 > for v in values: > # (value, name) > (num,name) = v > + if num < self.min: > + self.min = num > + if num > self.max: > + self.max = num