From: Ian Campbell Subject: Re: [PATCH v3A 2/3] tools/libxc: allow controlling the max C-state sub-state Date: Fri, 27 Jun 2014 16:02:03 +0100 Message-ID: <1403881323.3169.65.camel@kazak.uk.xensource.com> References: <1403521791-28859-1-git-send-email-ross.lagerwall@citrix.com> <1403521791-28859-3-git-send-email-ross.lagerwall@citrix.com> <53A86754020000780001C80D@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <53A86754020000780001C80D@mail.emea.novell.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: Jan Beulich Cc: Ross Lagerwall , Stefano Stabellini , Ian Jackson , Xen-devel List-Id: xen-devel@lists.xenproject.org On Mon, 2014-06-23 at 16:43 +0100, Jan Beulich wrote: > --- a/xen/include/public/sysctl.h > +++ b/xen/include/public/sysctl.h > @@ -354,7 +354,11 @@ struct xen_sysctl_pm_op { > /* set/reset scheduler power saving option */ > #define XEN_SYSCTL_pm_op_set_sched_opt_smt 0x21 > > - /* cpuidle max_cstate access command */ > + /* > + * cpuidle max C-state and max C-sub-state access command: > + * Set cpuid to 0 for max C-state. > + * Set cpuid to 1 for max C-sub-state. This seems pretty nasty. Since the sysctl interface is not fixed can't we just turn the existing get/set_max_cstate fields into structs? Or (less preferably) define C-sub-states to have bit 31 set. Can we at least get some named constants instead of 0 and 1? Ian.