linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/22] KVM: x86: Fill *_x86_ops via kvm-x86-ops.h
@ 2022-01-28  0:51 Sean Christopherson
  2022-01-28  0:51 ` [PATCH 01/22] KVM: x86: Drop unnecessary and confusing KVM_X86_OP_NULL macro Sean Christopherson
                   ` (21 more replies)
  0 siblings, 22 replies; 29+ messages in thread
From: Sean Christopherson @ 2022-01-28  0:51 UTC (permalink / raw)
  To: Paolo Bonzini
  Cc: Sean Christopherson, Vitaly Kuznetsov, Wanpeng Li, Jim Mattson,
	Joerg Roedel, kvm, linux-kernel, Like Xu

Use kvm-x86-ops.h to fill vmx_x86_ops and svm_x86_ops, with a bunch of
cleanup along the way to make that happen.  Aside from removing a lot of
boilerplate code, the part I most like about fill via kvm-x86-ops.h is
that it provides enforcement that (a) new kvm_x86_ops hooks get added to
kvm-x86-ops.h and (b) vendor code has to implement _something_, even if
it's a redirect to NULL, which provides documentation of what's going on.

Patch 01 isn't exactly necessary for this series, my hope is that Maxim's
bug fix for the AVIC race can go on top without introducing too much
conflict for either of us.

Sean Christopherson (22):
  KVM: x86: Drop unnecessary and confusing KVM_X86_OP_NULL macro
  KVM: x86: Move delivery of non-APICv interrupt into vendor code
  KVM: x86: Drop export for .tlb_flush_current() static_call key
  KVM: x86: Rename kvm_x86_ops pointers to align w/ preferred vendor
    names
  KVM: x86: Use static_call() for .vcpu_deliver_sipi_vector()
  KVM: VMX: Call vmx_get_cpl() directly in handle_dr()
  KVM: xen: Use static_call() for invoking kvm_x86_ops hooks
  KVM: nVMX: Refactor PMU refresh to avoid referencing
    kvm_x86_ops.pmu_ops
  KVM: x86: Uninline and export hv_track_root_tdp()
  KVM: x86: Unexport kvm_x86_ops
  KVM: x86: Use static_call() for copy/move encryption context ioctls()
  KVM: x86: Allow different macros for APICv, CVM, and Hyper-V
    kvm_x86_ops
  KVM: VMX: Rename VMX functions to conform to kvm_x86_ops names
  KVM: VMX: Use kvm-x86-ops.h to fill vmx_x86_ops
  KVM: x86: Move get_cs_db_l_bits() helper to SVM
  KVM: SVM: Rename svm_flush_tlb() to svm_flush_tlb_current()
  KVM: SVM: Remove unused MAX_INST_SIZE #define
  KVM: SVM: Rename AVIC helpers to use "avic" prefix instead of "svm"
  KVM: x86: Use more verbose names for mem encrypt kvm_x86_ops hooks
  KVM: SVM: Rename SEV implemenations to conform to kvm_x86_ops hooks
  KVM: SVM: Rename hook implementations to conform to kvm_x86_ops' names
  KVM: SVM: Use kvm-x86-ops.h to fill svm_x86_ops

 arch/x86/include/asm/kvm-x86-ops.h | 131 ++++++++++--------
 arch/x86/include/asm/kvm_host.h    |  32 ++---
 arch/x86/kvm/kvm_onhyperv.c        |  14 ++
 arch/x86/kvm/kvm_onhyperv.h        |  14 +-
 arch/x86/kvm/lapic.c               |  12 +-
 arch/x86/kvm/mmu/mmu.c             |   6 +-
 arch/x86/kvm/svm/avic.c            |  28 ++--
 arch/x86/kvm/svm/sev.c             |  18 +--
 arch/x86/kvm/svm/svm.c             | 214 ++++++++++-------------------
 arch/x86/kvm/svm/svm.h             |  41 +++---
 arch/x86/kvm/vmx/nested.c          |   5 +-
 arch/x86/kvm/vmx/nested.h          |   3 +-
 arch/x86/kvm/vmx/pmu_intel.c       |   3 +-
 arch/x86/kvm/vmx/posted_intr.c     |   6 +-
 arch/x86/kvm/vmx/posted_intr.h     |   4 +-
 arch/x86/kvm/vmx/vmx.c             | 178 +++++++-----------------
 arch/x86/kvm/x86.c                 |  79 +++++------
 arch/x86/kvm/xen.c                 |   4 +-
 18 files changed, 324 insertions(+), 468 deletions(-)


base-commit: b029c138e8f090f5cb9ba77ef20509f903ef0004
-- 
2.35.0.rc0.227.g00780c9af4-goog


^ permalink raw reply	[flat|nested] 29+ messages in thread

end of thread, other threads:[~2022-01-31 16:49 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-28  0:51 [PATCH 00/22] KVM: x86: Fill *_x86_ops via kvm-x86-ops.h Sean Christopherson
2022-01-28  0:51 ` [PATCH 01/22] KVM: x86: Drop unnecessary and confusing KVM_X86_OP_NULL macro Sean Christopherson
2022-01-28 10:11   ` Paolo Bonzini
2022-01-28 15:42     ` Sean Christopherson
2022-01-31 14:56       ` Paolo Bonzini
2022-01-31 15:19         ` Maxim Levitsky
2022-01-31 16:48         ` Sean Christopherson
2022-01-28  0:51 ` [PATCH 02/22] KVM: x86: Move delivery of non-APICv interrupt into vendor code Sean Christopherson
2022-01-28  0:51 ` [PATCH 03/22] KVM: x86: Drop export for .tlb_flush_current() static_call key Sean Christopherson
2022-01-28  0:51 ` [PATCH 04/22] KVM: x86: Rename kvm_x86_ops pointers to align w/ preferred vendor names Sean Christopherson
2022-01-28  0:51 ` [PATCH 05/22] KVM: x86: Use static_call() for .vcpu_deliver_sipi_vector() Sean Christopherson
2022-01-28  0:51 ` [PATCH 06/22] KVM: VMX: Call vmx_get_cpl() directly in handle_dr() Sean Christopherson
2022-01-28  0:51 ` [PATCH 07/22] KVM: xen: Use static_call() for invoking kvm_x86_ops hooks Sean Christopherson
2022-01-28  0:51 ` [PATCH 08/22] KVM: nVMX: Refactor PMU refresh to avoid referencing kvm_x86_ops.pmu_ops Sean Christopherson
2022-01-28  0:51 ` [PATCH 09/22] KVM: x86: Uninline and export hv_track_root_tdp() Sean Christopherson
2022-01-31 16:19   ` Vitaly Kuznetsov
2022-01-28  0:51 ` [PATCH 10/22] KVM: x86: Unexport kvm_x86_ops Sean Christopherson
2022-01-28  0:51 ` [PATCH 11/22] KVM: x86: Use static_call() for copy/move encryption context ioctls() Sean Christopherson
2022-01-28  0:51 ` [PATCH 12/22] KVM: x86: Allow different macros for APICv, CVM, and Hyper-V kvm_x86_ops Sean Christopherson
2022-01-28  0:51 ` [PATCH 13/22] KVM: VMX: Rename VMX functions to conform to kvm_x86_ops names Sean Christopherson
2022-01-28  0:52 ` [PATCH 14/22] KVM: VMX: Use kvm-x86-ops.h to fill vmx_x86_ops Sean Christopherson
2022-01-28  0:52 ` [PATCH 15/22] KVM: x86: Move get_cs_db_l_bits() helper to SVM Sean Christopherson
2022-01-28  0:52 ` [PATCH 16/22] KVM: SVM: Rename svm_flush_tlb() to svm_flush_tlb_current() Sean Christopherson
2022-01-28  0:52 ` [PATCH 17/22] KVM: SVM: Remove unused MAX_INST_SIZE #define Sean Christopherson
2022-01-28  0:52 ` [PATCH 18/22] KVM: SVM: Rename AVIC helpers to use "avic" prefix instead of "svm" Sean Christopherson
2022-01-28  0:52 ` [PATCH 19/22] KVM: x86: Use more verbose names for mem encrypt kvm_x86_ops hooks Sean Christopherson
2022-01-28  0:52 ` [PATCH 20/22] KVM: SVM: Rename SEV implemenations to conform to " Sean Christopherson
2022-01-28  0:52 ` [PATCH 21/22] KVM: SVM: Rename hook implementations to conform to kvm_x86_ops' names Sean Christopherson
2022-01-28  0:52 ` [PATCH 22/22] KVM: SVM: Use kvm-x86-ops.h to fill svm_x86_ops Sean Christopherson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).