* [PATCH v3 3/3] perf/x86/intel: Expose EPT-friendly PEBS for SPR and future models [not found] <20221109082802.27543-1-likexu@tencent.com> @ 2022-11-09 8:28 ` Like Xu 2022-11-14 12:46 ` Peter Zijlstra 0 siblings, 1 reply; 3+ messages in thread From: Like Xu @ 2022-11-09 8:28 UTC (permalink / raw) To: Sean Christopherson, Paolo Bonzini Cc: linux-kernel, kvm, Peter Zijlstra, linux-perf-users, Kan Liang From: Like Xu <likexu@tencent.com> According to Intel SDM, the EPT-friendly PEBS is supported by all the platforms after ICX, ADL and the future platforms with PEBS format 5. Currently the only in-kernel user of this capability is KVM, which has very limited support for hybrid core pmu, so ADL and its successors do not currently expose this capability. When both hybrid core and PEBS format 5 are present, KVM will decide on its own merits. Cc: Peter Zijlstra <peterz@infradead.org> Cc: linux-perf-users@vger.kernel.org Suggested-by: Kan Liang <kan.liang@linux.intel.com> Signed-off-by: Like Xu <likexu@tencent.com> Reviewed-by: Kan Liang <kan.liang@linux.intel.com> --- Nit: This change is proposed to be applied via the KVM tree. arch/x86/events/intel/core.c | 1 + arch/x86/events/intel/ds.c | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/x86/events/intel/core.c b/arch/x86/events/intel/core.c index a646a5f9a235..15e061fbb2f3 100644 --- a/arch/x86/events/intel/core.c +++ b/arch/x86/events/intel/core.c @@ -6350,6 +6350,7 @@ __init int intel_pmu_init(void) x86_pmu.pebs_constraints = intel_spr_pebs_event_constraints; x86_pmu.extra_regs = intel_spr_extra_regs; x86_pmu.limit_period = spr_limit_period; + x86_pmu.pebs_ept = 1; x86_pmu.pebs_aliases = NULL; x86_pmu.pebs_prec_dist = true; x86_pmu.pebs_block = true; diff --git a/arch/x86/events/intel/ds.c b/arch/x86/events/intel/ds.c index 7839507b3844..185e66b4ce31 100644 --- a/arch/x86/events/intel/ds.c +++ b/arch/x86/events/intel/ds.c @@ -2293,8 +2293,10 @@ void __init intel_ds_init(void) x86_pmu.large_pebs_flags |= PERF_SAMPLE_TIME; break; - case 4: case 5: + x86_pmu.pebs_ept = 1; + fallthrough; + case 4: x86_pmu.drain_pebs = intel_pmu_drain_pebs_icl; x86_pmu.pebs_record_size = sizeof(struct pebs_basic); if (x86_pmu.intel_cap.pebs_baseline) { -- 2.38.1 ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v3 3/3] perf/x86/intel: Expose EPT-friendly PEBS for SPR and future models 2022-11-09 8:28 ` [PATCH v3 3/3] perf/x86/intel: Expose EPT-friendly PEBS for SPR and future models Like Xu @ 2022-11-14 12:46 ` Peter Zijlstra 2022-11-15 7:16 ` Like Xu 0 siblings, 1 reply; 3+ messages in thread From: Peter Zijlstra @ 2022-11-14 12:46 UTC (permalink / raw) To: Like Xu Cc: Sean Christopherson, Paolo Bonzini, linux-kernel, kvm, linux-perf-users, Kan Liang On Wed, Nov 09, 2022 at 04:28:02PM +0800, Like Xu wrote: > From: Like Xu <likexu@tencent.com> > > According to Intel SDM, the EPT-friendly PEBS is supported by all the > platforms after ICX, ADL and the future platforms with PEBS format 5. > > Currently the only in-kernel user of this capability is KVM, which has > very limited support for hybrid core pmu, so ADL and its successors do > not currently expose this capability. When both hybrid core and PEBS > format 5 are present, KVM will decide on its own merits. Oh right; the whole ADL KVM trainwreck :/ What's the plan there? > Cc: Peter Zijlstra <peterz@infradead.org> > Cc: linux-perf-users@vger.kernel.org > Suggested-by: Kan Liang <kan.liang@linux.intel.com> > Signed-off-by: Like Xu <likexu@tencent.com> > Reviewed-by: Kan Liang <kan.liang@linux.intel.com> > --- > Nit: This change is proposed to be applied via the KVM tree. Works for me; Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org> ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v3 3/3] perf/x86/intel: Expose EPT-friendly PEBS for SPR and future models 2022-11-14 12:46 ` Peter Zijlstra @ 2022-11-15 7:16 ` Like Xu 0 siblings, 0 replies; 3+ messages in thread From: Like Xu @ 2022-11-15 7:16 UTC (permalink / raw) To: Peter Zijlstra, Kan Liang Cc: Sean Christopherson, Paolo Bonzini, linux-kernel, kvm, linux-perf-users On 14/11/2022 8:46 pm, Peter Zijlstra wrote: > On Wed, Nov 09, 2022 at 04:28:02PM +0800, Like Xu wrote: >> From: Like Xu <likexu@tencent.com> >> >> According to Intel SDM, the EPT-friendly PEBS is supported by all the >> platforms after ICX, ADL and the future platforms with PEBS format 5. >> >> Currently the only in-kernel user of this capability is KVM, which has >> very limited support for hybrid core pmu, so ADL and its successors do >> not currently expose this capability. When both hybrid core and PEBS >> format 5 are present, KVM will decide on its own merits. > > Oh right; the whole ADL KVM trainwreck :/ What's the plan there? As we know, our community doesn't really have a plan in terms of feature reception, considering hyprid pmu doesn't have market share in the data center (where most KVM users are, and the test farms), and KVM-based client hypervisor will actively control the cpu that the KVM module initializes, and adds more trainwreck, so as of now I don't have a timeline for vPMU on ADL+ (until there are noteworthy user complaints). Please let me know if you and Kan have other input. > >> Cc: Peter Zijlstra <peterz@infradead.org> >> Cc: linux-perf-users@vger.kernel.org >> Suggested-by: Kan Liang <kan.liang@linux.intel.com> >> Signed-off-by: Like Xu <likexu@tencent.com> >> Reviewed-by: Kan Liang <kan.liang@linux.intel.com> >> --- >> Nit: This change is proposed to be applied via the KVM tree. > > Works for me; > > Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org> ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-11-15 7:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20221109082802.27543-1-likexu@tencent.com>
2022-11-09 8:28 ` [PATCH v3 3/3] perf/x86/intel: Expose EPT-friendly PEBS for SPR and future models Like Xu
2022-11-14 12:46 ` Peter Zijlstra
2022-11-15 7:16 ` Like Xu
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox