From: Ian Campbell Subject: Re: [PATCH] sysctl: annotate struct pm_cx_stat's pc[]/cc[] Date: Fri, 21 Mar 2014 11:28:43 +0000 Message-ID: <1395401323.27358.50.camel@kazak.uk.xensource.com> References: <5329CC7F0200007800125D5F@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WQxd1-0006IX-Rm for xen-devel@lists.xenproject.org; Fri, 21 Mar 2014 11:28:48 +0000 In-Reply-To: <5329CC7F0200007800125D5F@nat28.tlf.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: xen-devel , Keir Fraser , Ian Jackson List-Id: xen-devel@lists.xenproject.org On Wed, 2014-03-19 at 15:57 +0000, Jan Beulich wrote: > Suggested-by: Ian Jackson > Signed-off-by: Jan Beulich Acked-by: Ian Campbell Assuming you will apply yourself once you have sufficient acks etc. > --- a/xen/include/public/sysctl.h > +++ b/xen/include/public/sysctl.h > @@ -228,8 +228,15 @@ struct pm_cx_stat { > XEN_GUEST_HANDLE_64(uint64) residencies; /* Cx residencies */ > uint32_t nr_pc; /* entry nr in pc[] */ > uint32_t nr_cc; /* entry nr in cc[] */ > - XEN_GUEST_HANDLE_64(uint64) pc; /* 1-biased indexing */ > - XEN_GUEST_HANDLE_64(uint64) cc; /* 1-biased indexing */ > + /* > + * These two arrays may (and generally will) have unused slots; slots not > + * having a corresponding hardware register will not be written by the > + * hypervisor. It is therefore up to the caller to put a suitable sentinel > + * into all slots before invoking the function. > + * Indexing is 1-biased (PC1/CC1 being at index 0). > + */ > + XEN_GUEST_HANDLE_64(uint64) pc; > + XEN_GUEST_HANDLE_64(uint64) cc; > }; > > struct xen_sysctl_get_pmstat { > > > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel