]> Git Repo - linux.git/commit
KVM: x86/pmu: Add IA32_PEBS_ENABLE MSR emulation for extended PEBS
authorLike Xu <[email protected]>
Mon, 11 Apr 2022 10:19:36 +0000 (18:19 +0800)
committerPaolo Bonzini <[email protected]>
Wed, 8 Jun 2022 08:47:55 +0000 (04:47 -0400)
commitc59a1f106f5cd4843c097069ff1bb2ad72103a67
tree6f7a1e7397e411c2137748d5ce699067aad4b6d7
parent0d23dc34a7cefde5ee25c321949579694edbd16d
KVM: x86/pmu: Add IA32_PEBS_ENABLE MSR emulation for extended PEBS

If IA32_PERF_CAPABILITIES.PEBS_BASELINE [bit 14] is set, the
IA32_PEBS_ENABLE MSR exists and all architecturally enumerated fixed
and general-purpose counters have corresponding bits in IA32_PEBS_ENABLE
that enable generation of PEBS records. The general-purpose counter bits
start at bit IA32_PEBS_ENABLE[0], and the fixed counter bits start at
bit IA32_PEBS_ENABLE[32].

When guest PEBS is enabled, the IA32_PEBS_ENABLE MSR will be
added to the perf_guest_switch_msr() and atomically switched during
the VMX transitions just like CORE_PERF_GLOBAL_CTRL MSR.

Based on whether the platform supports x86_pmu.pebs_ept, it has also
refactored the way to add more msrs to arr[] in intel_guest_get_msrs()
for extensibility.

Originally-by: Andi Kleen <[email protected]>
Co-developed-by: Kan Liang <[email protected]>
Signed-off-by: Kan Liang <[email protected]>
Co-developed-by: Luwei Kang <[email protected]>
Signed-off-by: Luwei Kang <[email protected]>
Signed-off-by: Like Xu <[email protected]>
Acked-by: Peter Zijlstra (Intel) <[email protected]>
Message-Id: <20220411101946[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
arch/x86/events/intel/core.c
arch/x86/include/asm/kvm_host.h
arch/x86/include/asm/msr-index.h
arch/x86/kvm/vmx/pmu_intel.c
arch/x86/kvm/x86.c
This page took 0.074247 seconds and 4 git commands to generate.