Skip to content

KVM: x86: Convert nested ops to static calls

Sean Christopherson kvm lkml 2 versions – Applied

Status from this message: Applied to kvm-x86 misc, thanks!

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 6 repliesApplied
  2. v13 patches 0 repliesSuperseded

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/3KVM: x86: Reject nested CAP enablement if nested virtualization is disabledarch/x86/include/asm/kvm_host.h arch/x86/kvm/hyperv.c arch/x86/kvm/svm/svm.c +2 more+13 -64 replies
2/3KVM: x86: Add static calls for nested virtualization opsarch/x86/include/asm/kvm-x86-nested-ops.h arch/x86/include/asm/kvm_host.h arch/x86/kvm/hyperv.c +4 more+86 -270 replies
3/3KVM: x86: Move nested_ops out of kvm_x86_ops, to global kvm_nested_opsarch/x86/include/asm/kvm_host.h arch/x86/kvm/hyperv.c arch/x86/kvm/svm/nested.c +4 more+20 -210 replies

Reviews trailers per patch

1 of 3 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchVitaly KuznetsovKai Huang
SeriesR-b
1/3R-b
2/3
3/3

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

Read the v2 thread

Cover letter [PATCH v2 0/3] KVM: x86: Convert nested ops to static calls

Convert nested_ops to use static calls, mainly because the nested ops are bizarrely different than the x86 and PMU ops, and the kvm_x86_ops.nested_ops-> code is an eyesore (IMO). I haven't bothered to do any performance testing.

v2: In patch 1, keep the get_evmcs_version != NULL check in kvm_get_hv_cpuid(),
then convert it to a RET0 call in patch 2. [Sashiko]

v1: https://lore.kernel.org/all/[email protected]

Sean Christopherson (3):
KVM: x86: Reject nested CAP enablement if nested virtualization is
disabled
KVM: x86: Add static calls for nested virtualization ops
KVM: x86: Move nested_ops out of kvm_x86_ops, to global kvm_nested_ops

 arch/x86/include/asm/kvm-x86-nested-ops.h | 36 +++++++++++++
 arch/x86/include/asm/kvm_host.h           | 14 ++++-
 arch/x86/kvm/hyperv.c                     |  6 +--
 arch/x86/kvm/mmu.h                        |  5 +-
 arch/x86/kvm/mmu/paging_tmpl.h            |  2 +-
 arch/x86/kvm/svm/nested.c                 |  2 +-
 arch/x86/kvm/svm/svm.c                    |  4 +-
 arch/x86/kvm/vmx/main.c                   |  3 +-
 arch/x86/kvm/vmx/nested.c                 |  2 +-
 arch/x86/kvm/vmx/vmx.c                    |  1 +
 arch/x86/kvm/x86.c                        | 66 +++++++++++++++--------
 arch/x86/kvm/x86.h                        |  2 +-
 12 files changed, 104 insertions(+), 39 deletions(-)
 create mode 100644 arch/x86/include/asm/kvm-x86-nested-ops.h

base-commit: a204badd8432f93b7e862e7dac6db0fe3d65f370

Signature · 1 line
2.55.0.rc0.799.gd6f94ed593-goog