Skip to content

KVM: x86: Fill *_x86_ops via kvm-x86-ops.h

Sean Christopherson kvm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest22 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/22KVM: x86: Drop unnecessary and confusing KVM_X86_OP_NULL macroarch/x86/include/asm/kvm-x86-ops.h arch/x86/include/asm/kvm_host.h arch/x86/kvm/x86.c+35 -445 replies
2/22KVM: x86: Move delivery of non-APICv interrupt into vendor codearch/x86/include/asm/kvm-x86-ops.h arch/x86/include/asm/kvm_host.h arch/x86/kvm/lapic.c +2 more+37 -120 replies
3/22KVM: x86: Drop export for .tlb_flush_current() static_call keyarch/x86/kvm/x86.c+0 -10 replies
4/22KVM: x86: Rename kvm_x86_ops pointers to align w/ preferred vendor namesarch/x86/include/asm/kvm-x86-ops.h arch/x86/include/asm/kvm_host.h arch/x86/kvm/mmu/mmu.c +3 more+56 -590 replies
5/22KVM: x86: Use static_call() for .vcpu_deliver_sipi_vector()arch/x86/include/asm/kvm-x86-ops.h arch/x86/kvm/lapic.c+2 -10 replies
6/22KVM: VMX: Call vmx_get_cpl() directly in handle_dr()arch/x86/kvm/vmx/vmx.c+1 -10 replies
7/22KVM: xen: Use static_call() for invoking kvm_x86_ops hooksarch/x86/kvm/xen.c+2 -20 replies
8/22KVM: nVMX: Refactor PMU refresh to avoid referencing kvm_x86_ops.pmu_opsarch/x86/kvm/vmx/nested.c arch/x86/kvm/vmx/nested.h arch/x86/kvm/vmx/pmu_intel.c+7 -40 replies
9/22KVM: x86: Uninline and export hv_track_root_tdp()arch/x86/kvm/kvm_onhyperv.c arch/x86/kvm/kvm_onhyperv.h+15 -131 reply
10/22KVM: x86: Unexport kvm_x86_opsarch/x86/kvm/x86.c+0 -10 replies
11/22KVM: x86: Use static_call() for copy/move encryption context ioctls()arch/x86/include/asm/kvm-x86-ops.h arch/x86/kvm/x86.c+12 -70 replies
12/22KVM: x86: Allow different macros for APICv, CVM, and Hyper-V kvm_x86_opsarch/x86/include/asm/kvm-x86-ops.h+48 -260 replies
13/22KVM: VMX: Rename VMX functions to conform to kvm_x86_ops namesarch/x86/kvm/vmx/posted_intr.c arch/x86/kvm/vmx/posted_intr.h arch/x86/kvm/vmx/vmx.c+18 -180 replies
14/22KVM: VMX: Use kvm-x86-ops.h to fill vmx_x86_opsarch/x86/kvm/vmx/vmx.c+25 -1240 replies
15/22KVM: x86: Move get_cs_db_l_bits() helper to SVMarch/x86/include/asm/kvm_host.h arch/x86/kvm/svm/svm.c arch/x86/kvm/x86.c+10 -120 replies
16/22KVM: SVM: Rename svm_flush_tlb() to svm_flush_tlb_current()arch/x86/kvm/svm/svm.c arch/x86/kvm/svm/svm.h+7 -60 replies
17/22KVM: SVM: Remove unused MAX_INST_SIZE #definearch/x86/kvm/svm/svm.c+0 -20 replies
18/22KVM: SVM: Rename AVIC helpers to use "avic" prefix instead of "svm"arch/x86/kvm/svm/avic.c arch/x86/kvm/svm/svm.c arch/x86/kvm/svm/svm.h+33 -330 replies
19/22KVM: x86: Use more verbose names for mem encrypt kvm_x86_ops hooksarch/x86/include/asm/kvm-x86-ops.h arch/x86/include/asm/kvm_host.h arch/x86/kvm/svm/sev.c +3 more+23 -170 replies
20/22KVM: SVM: Rename SEV implemenations to conform to kvm_x86_ops hooksarch/x86/kvm/svm/sev.c arch/x86/kvm/svm/svm.c arch/x86/kvm/svm/svm.h+21 -210 replies
21/22KVM: SVM: Rename hook implementations to conform to kvm_x86_ops' namesarch/x86/kvm/svm/sev.c arch/x86/kvm/svm/svm.c arch/x86/kvm/svm/svm.h+25 -250 replies
22/22KVM: SVM: Use kvm-x86-ops.h to fill svm_x86_opsarch/x86/kvm/svm/svm.c+32 -1240 replies

Reviews trailers per patch

1 of 22 patches has a Reviewed-by or Acked-by.

PatchVitaly Kuznetsov
1/22
2/22
3/22
4/22
5/22
6/22
7/22
8/22
9/22R-b
10/22
11/22
12/22
13/22
14/22
15/22
16/22
17/22
18/22
19/22
20/22
21/22
22/22

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 00/22] KVM: x86: Fill *_x86_ops via kvm-x86-ops.h

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

Signature · 1 line
2.35.0.rc0.227.g00780c9af4-goog