lkml.org 
[lkml]   [2011]   [Nov]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCHv2 7/9] KVM: Expose the architectural performance monitoring CPUID leaf
On Mon, Nov 07, 2011 at 04:45:57PM +0100, Peter Zijlstra wrote:
> On Mon, 2011-11-07 at 17:41 +0200, Gleb Natapov wrote:
> > > > + entry->eax = min(cap.version, 2)
> > > > + | (cap.num_counters_gp << 8)
> > > > + | (cap.bit_width_gp << 16)
> > > > + | (cap.events_mask_len << 24);
>
>
> > Do you mean by doing cpuid here directly instead of checking perf
> > capability?
>
> No I meant something like:
>
> union cpuid10_eax eax;
>
> eax.version = min(cap.version, 2);
> eax.bit_width = cap.bit_width;
> eax.num_counters = cap.num_counters;
> eax.mask_length = cap.mask_length;
>
> entry->eax = eax.full;
>
Ah, yes. Will do that.

--
Gleb.


\
 
 \ /
  Last update: 2011-11-07 16:57    [W:0.113 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site