lkml.org 
[lkml]   [2011]   [Nov]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCHv2 7/9] KVM: Expose the architectural performance monitoring CPUID leaf
From
Date
On Thu, 2011-11-03 at 14:33 +0200, Gleb Natapov wrote:
> + case 0xa: { /* Architectural Performance Monitoring */
> + struct x86_pmu_capability cap;
> +
> + perf_get_x86_pmu_capability(&cap);
> +
> + /*
> + * Only support guest architectural pmu on a host
> + * with architectural pmu.
> + */
> + if (!cap.version)
> + memset(&cap, 0, sizeof(cap));
> +
> + entry->eax = min(cap.version, 2)
> + | (cap.num_counters_gp << 8)
> + | (cap.bit_width_gp << 16)
> + | (cap.events_mask_len << 24);
> + entry->ebx = cap.events_mask;
> + entry->ecx = 0;
> + entry->edx = cap.num_counters_fixed
> + | (cap.bit_width_fixed << 5);
> + break;
> + }

would it make sense to use the cpuid10_e[ad]x unions to fill out that
data?


\
 
 \ /
  Last update: 2011-11-07 15:15    [W:0.117 / U:11.604 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site