llvm.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] KVM: VMX: Stub out enable_evmcs static key
@ 2023-02-08 20:54 Sean Christopherson
  2023-02-08 20:54 ` [PATCH 1/2] KVM: nVMX: Move EVMCS1_SUPPORT_* macros to hyperv.c Sean Christopherson
  2023-02-08 20:54 ` [PATCH 2/2] KVM: VMX: Stub out enable_evmcs static key for CONFIG_HYPERV=n Sean Christopherson
  0 siblings, 2 replies; 8+ messages in thread
From: Sean Christopherson @ 2023-02-08 20:54 UTC (permalink / raw)
  To: Vitaly Kuznetsov, Sean Christopherson, Paolo Bonzini,
	Nathan Chancellor, Nick Desaulniers
  Cc: Tom Rix, kvm, llvm, linux-kernel

Stub out the enable_evmcs static key for 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).

Patch 1 is tangentially related cleanup.

Applies on `git@github.com:kvm-x86/linux.git vmx`.

Sean Christopherson (2):
  KVM: nVMX: Move EVMCS1_SUPPORT_* macros to hyperv.c
  KVM: VMX: Stub out enable_evmcs static key for CONFIG_HYPERV=n

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


base-commit: 93827a0a36396f2fd6368a54a020f420c8916e9b
-- 
2.39.1.519.gcb327c4b5f-goog


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

end of thread, other threads:[~2023-02-10  9:55 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-08 20:54 [PATCH 0/2] KVM: VMX: Stub out enable_evmcs static key Sean Christopherson
2023-02-08 20:54 ` [PATCH 1/2] KVM: nVMX: Move EVMCS1_SUPPORT_* macros to hyperv.c Sean Christopherson
2023-02-09 13:08   ` Vitaly Kuznetsov
2023-02-08 20:54 ` [PATCH 2/2] KVM: VMX: Stub out enable_evmcs static key for CONFIG_HYPERV=n Sean Christopherson
2023-02-09 13:13   ` Vitaly Kuznetsov
2023-02-09 13:56     ` Paolo Bonzini
2023-02-10  1:13       ` Sean Christopherson
2023-02-10  9:55         ` Vitaly Kuznetsov

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).