Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

perf/x86/intel: Support PERF_PMU_CAP_MEDIATED_VPMU

Apply the PERF_PMU_CAP_MEDIATED_VPMU for Intel core PMU. It only indicates
that the perf side of core PMU is ready to support the mediated vPMU.
Besides the capability, the hypervisor, a.k.a. KVM, still needs to check
the PMU version and other PMU features/capabilities to decide whether to
enable support mediated vPMUs.

[sean: massage changelog]
Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
Signed-off-by: Mingwei Zhang <mizhang@google.com>
Signed-off-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Tested-by: Xudong Hao <xudong.hao@intel.com>
Link: https://patch.msgid.link/20251206001720.468579-13-seanjc@google.com

authored by

Kan Liang and committed by
Peter Zijlstra
4280d795 c8824a95

+5
+5
arch/x86/events/intel/core.c
··· 5695 5695 else 5696 5696 pmu->intel_ctrl &= ~GLOBAL_CTRL_EN_PERF_METRICS; 5697 5697 5698 + pmu->pmu.capabilities |= PERF_PMU_CAP_MEDIATED_VPMU; 5699 + 5698 5700 intel_pmu_check_event_constraints_all(&pmu->pmu); 5699 5701 5700 5702 intel_pmu_check_extra_regs(pmu->extra_regs); ··· 7315 7313 if (x86_pmu.intel_cap.anythread_deprecated) 7316 7314 pr_cont(" AnyThread deprecated, "); 7317 7315 } 7316 + 7317 + /* The perf side of core PMU is ready to support the mediated vPMU. */ 7318 + x86_get_pmu(smp_processor_id())->capabilities |= PERF_PMU_CAP_MEDIATED_VPMU; 7318 7319 7319 7320 /* 7320 7321 * Many features on and after V6 require dynamic constraint,