lkml.org 
[lkml]   [2019]   [Oct]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH v1 3/8] KVM: x86: Allocate performance counter for PEBS event
Date
> >> >  static void pmc_reprogram_counter(struct kvm_pmc *pmc, u32 type,
> >> > unsigned config, bool exclude_user,
> >> > bool exclude_kernel, bool intr,
> >> > - bool in_tx, bool in_tx_cp)
> >> > + bool in_tx, bool in_tx_cp, bool pebs)
> >> > {
> >> > struct perf_event *event;
> >> > struct perf_event_attr attr = {
> >> > @@ -111,9 +111,12 @@ static void pmc_reprogram_counter(struct kvm_pmc *pmc, u32 type,
> >> > .exclude_user = exclude_user,
> >> > .exclude_kernel = exclude_kernel,
> >> > .config = config,
> >> > + .precise_ip = pebs ? 1 : 0,
> >> > + .aux_output = pebs ? 1 : 0,
> >>
> >> srsly?
> >
> > Hi Peter,
> > Thanks for review. For aux_output, I think it should be set 1 when the guest wants to enabled PEBS by Intel PT.
>
> attr.aux_output==1 means your group leader should be an intel_pt event for this to succeed. Luckily for this instance,
> perf_event_create_kernel_counter() doesn't actually check the attr.aux_output.
>
> Also, does 'bool pebs' mean PEBS-via-PT or just a PEBS counter? Or does it mean that in kvm it's the same thing?

It is the same thing. Allocate a counter for PEBS event and use PEBS-via-PT.

Thanks,
Luwei Kang

>
> Regards,
> --
> Alex

\
 
 \ /
  Last update: 2019-10-30 07:51    [W:0.958 / U:0.620 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site