mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sean Christopherson <seanjc@google.com>
To: Vitaly Kuznetsov <vkuznets@redhat.com>,
	Sean Christopherson <seanjc@google.com>,
	Paolo Bonzini <pbonzini@redhat.com>
Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v2 0/3] KVM: VMX: Stub out enable_evmcs static key
Date: Sat, 11 Feb 2023 00:35:31 +0000	[thread overview]
Message-ID: <20230211003534.564198-1-seanjc@google.com> (raw)

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 `git@github.com:kvm-x86/linux.git vmx`.

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

v1: https://lore.kernel.org/all/20230208205430.1424667-1-seanjc@google.com

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
-- 
2.39.1.581.gbfd45094c4-goog


             reply	other threads:[~2023-02-11  0:35 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-11  0:35 Sean Christopherson [this message]
2023-02-11  0:35 ` [PATCH v2 1/3] KVM: nVMX: Move EVMCS1_SUPPORT_* macros to hyperv.c Sean Christopherson
2023-02-11  0:35 ` [PATCH v2 2/3] KVM: VMX: Stub out enable_evmcs static key for CONFIG_HYPERV=n Sean Christopherson
2023-02-11  0:35 ` [PATCH v2 3/3] KVM: VMX: Rename "KVM is using eVMCS" static key to match its wrapper Sean Christopherson
2023-02-13 11:54   ` Vitaly Kuznetsov
2023-03-14 13:43 ` [PATCH v2 0/3] KVM: VMX: Stub out enable_evmcs static key Paolo Bonzini
2023-03-14 14:28   ` Sean Christopherson
2023-03-14 22:43     ` Paolo Bonzini
2023-03-15  0:05       ` Sean Christopherson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230211003534.564198-1-seanjc@google.com \
    --to=seanjc@google.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=vkuznets@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®