From mboxrd@z Thu Jan 1 00:00:00 1970 From: Boris Ostrovsky Subject: Re: [PATCH v2 5/6] xen/PMU: Intercept PMU-related MSR and APIC accesses Date: Thu, 12 Jun 2014 10:50:01 -0400 Message-ID: <5399BE19.1060501@oracle.com> References: <1402076686-26586-1-git-send-email-boris.ostrovsky@oracle.com> <1402076686-26586-6-git-send-email-boris.ostrovsky@oracle.com> <1925712.eaaqM1o2gH@amur> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1925712.eaaqM1o2gH@amur> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Dietmar Hahn Cc: kevin.tian@intel.com, david.vrabel@citrix.com, JBeulich@suse.com, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On 06/12/2014 02:56 AM, Dietmar Hahn wrote: > > + > +unsigned long long xen_intel_read_pmc(int counter) > +{ > + int err; > + uint32_t msr; > + > + if (counter & (1<<30)) > What means the 30? Should be a #define ...? Bit 30 of the counter determines whether the counter is general-purpose or fixed. Even though this is used only once I suppose I could make a define for it since there are a couple of other macros like that. -boris