Skip to content

KVM: VMX: Stub out enable_evmcs static key

Sean Christopherson kvm lkml 2 versions – Applied

Status from this message: Queued, thanks.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 5 repliesApplied
  2. v12 patches 5 repliesSuperseded

Changes in v2 from the cover letter

- Collect reviews. [Vitaly]
- Rename wrapper. [Vitaly, Paolo]
- Rename key too.

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/3KVM: nVMX: Move EVMCS1_SUPPORT_* macros to hyperv.carch/x86/kvm/vmx/hyperv.c arch/x86/kvm/vmx/hyperv.h+105 -1050 replies
2/3KVM: VMX: Stub out enable_evmcs static key for CONFIG_HYPERV=narch/x86/kvm/vmx/hyperv.c arch/x86/kvm/vmx/hyperv.h arch/x86/kvm/vmx/vmx.c +1 more+28 -230 replies
3/3KVM: VMX: Rename "KVM is using eVMCS" static key to match its wrapperarch/x86/kvm/vmx/hyperv.c arch/x86/kvm/vmx/hyperv.h arch/x86/kvm/vmx/vmx.c+4 -41 reply

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchVitaly Kuznetsov
1/3R-b
2/3R-b
3/3R-b

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: VMX: Stub out enable_evmcs static key

Stub out and rename the eVMCS static key when CONFIG_HYPERV=n. gcc (as of gcc-12) isn't clever enough to elide the nop placeholder when there's no code guarded by a static branch. With gcc-12, because of the vast number of VMCS accesses, eliminating the nops reduces the size of kvm-intel.ko by ~7.5% (200KiB).

Please holler if you would rather patch 3 be squashed into patch 2, i.e. add the wrapper and rename the key in one go. I split them because the combined changelog was getting into "here's a list of changes" territory.

Patch 1 is tangentially related cleanup.

Applies on [email protected]:kvm-x86/linux.git vmx.

v2:
- Collect reviews. [Vitaly]
- Rename wrapper. [Vitaly, Paolo]
- Rename key too.

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

Sean Christopherson (3):
KVM: nVMX: Move EVMCS1_SUPPORT_* macros to hyperv.c
KVM: VMX: Stub out enable_evmcs static key for CONFIG_HYPERV=n
KVM: VMX: Rename "KVM is using eVMCS" static key to match its wrapper

 arch/x86/kvm/vmx/hyperv.c  | 107 +++++++++++++++++++++++++++++++++-
 arch/x86/kvm/vmx/hyperv.h  | 115 +++----------------------------------
 arch/x86/kvm/vmx/vmx.c     |  17 +++---
 arch/x86/kvm/vmx/vmx_ops.h |  22 +++----
 4 files changed, 133 insertions(+), 128 deletions(-)

base-commit: 93827a0a36396f2fd6368a54a020f420c8916e9b

Signature · 1 line
2.39.1.581.gbfd45094c4-goog