mbox series

[v2,0/3] Use static_call for kvm_x86_ops

Message ID cover.1610680941.git.jbaron@akamai.com (mailing list archive)
Headers show
Series Use static_call for kvm_x86_ops | expand

Message

Jason Baron Jan. 15, 2021, 3:27 a.m. UTC
Hi,

Convert kvm_x86_ops to use static_call. Shows good performance
gains for cpuid loop micro-benchmark (results in patch 3/3).

Thanks,

-Jason


Changes from v1:
-Introduce kvm-x86-ops header with eye towards using this to define
 svm_x86_ops and vmx_x86_ops in follow on patches (Paolo, Sean)
-add new patch (1/3), that adds a vmx/svm prefix to help facilitate
 svm_x86_ops and vmx_x86_ops future conversions.
-added amd perf numbres to description of patch 3/3

Jason Baron (3):
  KVM: X86: append vmx/svm prefix to additional kvm_x86_ops functions
  KVM: x86: introduce definitions to support static calls for kvm_x86_ops
  KVM: x86: use static calls to reduce kvm_x86_ops overhead

 arch/x86/include/asm/kvm-x86-ops.h | 127 +++++++++++++++
 arch/x86/include/asm/kvm_host.h    |  21 ++-
 arch/x86/kvm/cpuid.c               |   2 +-
 arch/x86/kvm/hyperv.c              |   4 +-
 arch/x86/kvm/irq.c                 |   3 +-
 arch/x86/kvm/kvm_cache_regs.h      |  10 +-
 arch/x86/kvm/lapic.c               |  30 ++--
 arch/x86/kvm/mmu.h                 |   6 +-
 arch/x86/kvm/mmu/mmu.c             |  15 +-
 arch/x86/kvm/mmu/spte.c            |   2 +-
 arch/x86/kvm/pmu.c                 |   2 +-
 arch/x86/kvm/svm/svm.c             |  20 +--
 arch/x86/kvm/trace.h               |   4 +-
 arch/x86/kvm/vmx/nested.c          |   2 +-
 arch/x86/kvm/vmx/vmx.c             |  30 ++--
 arch/x86/kvm/vmx/vmx.h             |   2 +-
 arch/x86/kvm/x86.c                 | 307 +++++++++++++++++++------------------
 arch/x86/kvm/x86.h                 |   6 +-
 18 files changed, 369 insertions(+), 224 deletions(-)
 create mode 100644 arch/x86/include/asm/kvm-x86-ops.h

Comments

Paolo Bonzini Jan. 26, 2021, 4:47 p.m. UTC | #1
On 15/01/21 04:27, Jason Baron wrote:
> Hi,
> 
> Convert kvm_x86_ops to use static_call. Shows good performance
> gains for cpuid loop micro-benchmark (results in patch 3/3).

Queued, thanks.

Paolo

> Thanks,
> 
> -Jason
> 
> 
> Changes from v1:
> -Introduce kvm-x86-ops header with eye towards using this to define
>   svm_x86_ops and vmx_x86_ops in follow on patches (Paolo, Sean)
> -add new patch (1/3), that adds a vmx/svm prefix to help facilitate
>   svm_x86_ops and vmx_x86_ops future conversions.
> -added amd perf numbres to description of patch 3/3
> 
> Jason Baron (3):
>    KVM: X86: append vmx/svm prefix to additional kvm_x86_ops functions
>    KVM: x86: introduce definitions to support static calls for kvm_x86_ops
>    KVM: x86: use static calls to reduce kvm_x86_ops overhead
> 
>   arch/x86/include/asm/kvm-x86-ops.h | 127 +++++++++++++++
>   arch/x86/include/asm/kvm_host.h    |  21 ++-
>   arch/x86/kvm/cpuid.c               |   2 +-
>   arch/x86/kvm/hyperv.c              |   4 +-
>   arch/x86/kvm/irq.c                 |   3 +-
>   arch/x86/kvm/kvm_cache_regs.h      |  10 +-
>   arch/x86/kvm/lapic.c               |  30 ++--
>   arch/x86/kvm/mmu.h                 |   6 +-
>   arch/x86/kvm/mmu/mmu.c             |  15 +-
>   arch/x86/kvm/mmu/spte.c            |   2 +-
>   arch/x86/kvm/pmu.c                 |   2 +-
>   arch/x86/kvm/svm/svm.c             |  20 +--
>   arch/x86/kvm/trace.h               |   4 +-
>   arch/x86/kvm/vmx/nested.c          |   2 +-
>   arch/x86/kvm/vmx/vmx.c             |  30 ++--
>   arch/x86/kvm/vmx/vmx.h             |   2 +-
>   arch/x86/kvm/x86.c                 | 307 +++++++++++++++++++------------------
>   arch/x86/kvm/x86.h                 |   6 +-
>   18 files changed, 369 insertions(+), 224 deletions(-)
>   create mode 100644 arch/x86/include/asm/kvm-x86-ops.h
>