lkml.org 
[lkml]   [2022]   [May]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v4 3/7] perf/x86/amd/core: Detect PerfMonV2 support
On Mon, May 09, 2022 at 06:38:19PM +0530, Sandipan Das wrote:
>
> On 5/9/2022 6:31 PM, Like Xu wrote:
> > On 27/4/2022 7:31 pm, Sandipan Das wrote:
> >
> >>       x86_pmu.num_counters    = AMD64_NUM_COUNTERS_CORE;
> >
> > Thus boot_cpu_has(X86_FEATURE_PERFCTR_CORE) is true.
> >
> >> +
> >> +    /* Check for Performance Monitoring v2 support */
> >> +    if (boot_cpu_has(X86_FEATURE_PERFMON_V2)) {
> >> +        /* Update PMU version for later usage */
> >> +        x86_pmu.version = 2;
> >
> > Is it safe to assume that once AMD CPU has the PERFMON_V2 (or further) bit,
> >
> > it must also have the PERFCTR_CORE bit set ?
> >
>
> Yes, always. There won't be a case where PERFCTR_CORE is absent
> but PERFMON_V2 is present.

Let me introduce you to this dodgy virt stuff :-) Best put a sanity
check on it.

\
 
 \ /
  Last update: 2022-05-09 15:14    [W:0.071 / U:0.776 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site