Hi, This is a successor to a previous patch set from Jason Baron. Let's convert kvm_pmu_ops to use static_call. Shows good performance gains for a typical perf use case [2] in the guest (results in patch 3/3). [1] https://lore.kernel.org/lkml/cover.1610680941.git.jbaron@xxxxxxxxxx/ [2] perf record -e branch-instructions -e branch-misses \ -e cache-misses -e cache-references -e cpu-cycles \ -e instructions ./workload Thanks, Like Xu (3): KVM: x86: Copy kvm_pmu_ops by value to eliminate layer of indirection KVM: x86: Introduce definitions to support static calls for kvm_pmu_ops KVM: x86: Use static calls to reduce kvm_pmu_ops overhead arch/x86/include/asm/kvm-x86-pmu-ops.h | 32 ++++++++++++++++++ arch/x86/kvm/pmu.c | 46 +++++++++++++++----------- arch/x86/kvm/pmu.h | 19 ++++++++++- arch/x86/kvm/vmx/nested.c | 2 +- arch/x86/kvm/x86.c | 5 +++ 5 files changed, 83 insertions(+), 21 deletions(-) create mode 100644 arch/x86/include/asm/kvm-x86-pmu-ops.h -- 2.33.0