]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
KVM: x86/pmu: Add wrappers for counting emulated instructions/branches
authorSean Christopherson <seanjc@google.com>
Tue, 5 Aug 2025 19:05:18 +0000 (12:05 -0700)
committerSean Christopherson <seanjc@google.com>
Tue, 19 Aug 2025 18:59:37 +0000 (11:59 -0700)
commit43f5bea2639ccca59541f33d62342543b4461937
treed71eb4c84c87e0613929d922875d04c26e58b62a
parenta3e80bf73ee1f89ad4ccd53dd4f2654e23e72529
KVM: x86/pmu: Add wrappers for counting emulated instructions/branches

Add wrappers for triggering instruction retired and branch retired PMU
events in anticipation of reworking the internal mechanisms to track
which PMCs need to be evaluated, e.g. to avoid having to walk and check
every PMC.

Opportunistically bury "struct kvm_pmu_emulated_event_selectors" in pmu.c.

No functional change intended.

Link: https://lore.kernel.org/r/20250805190526.1453366-11-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/pmu.c
arch/x86/kvm/pmu.h
arch/x86/kvm/vmx/nested.c
arch/x86/kvm/x86.c