lkml.org 
[lkml]   [2020]   [May]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH v11 05/11] perf/x86: Keep LBR stack unchanged in host context for guest LBR event
    On Thu, May 14, 2020 at 04:30:48PM +0800, Like Xu wrote:
    > @@ -544,7 +562,12 @@ void intel_pmu_lbr_enable_all(bool pmi)
    > {
    > struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events);
    >
    > - if (cpuc->lbr_users)
    > + /*
    > + * When the LBR hardware is scheduled for a guest LBR event,
    > + * the guest will dis/enables LBR itself at the appropriate time,
    > + * including configuring MSR_LBR_SELECT.
    > + */
    > + if (cpuc->lbr_users && !cpuc->guest_lbr_enabled)
    > __intel_pmu_lbr_enable(pmi);
    > }

    No!, that should be done through perf_event_attr::exclude_host, as I
    believe all the other KVM event do it.

    \
     
     \ /
      Last update: 2020-05-18 14:10    [W:4.147 / U:0.060 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site