[v2,0/3] KVM: VMX: Stub out enable_evmcs static key

Message ID 20230211003534.564198-1-seanjc@google.com
Headers
Series KVM: VMX: Stub out enable_evmcs static key |

Message

Sean Christopherson Feb. 11, 2023, 12:35 a.m. UTC
  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
  

Comments

Paolo Bonzini March 14, 2023, 1:43 p.m. UTC | #1
Queued, thanks.

Paolo
  
Sean Christopherson March 14, 2023, 2:28 p.m. UTC | #2
On Tue, Mar 14, 2023, Paolo Bonzini wrote:
> Queued, thanks.

Paolo,

Are you grabbing this for 6.3 or 6.4?  If it's for 6.4, what is your plan for 6.4?
I assumed we were taking the same approach as we did for 6.3, where you handle the
current cycle (stabilizing 6.3) and I focus on the next cycle (building 6.4).
  
Paolo Bonzini March 14, 2023, 10:43 p.m. UTC | #3
Il mar 14 mar 2023, 15:29 Sean Christopherson <seanjc@google.com> ha scritto:
>
> On Tue, Mar 14, 2023, Paolo Bonzini wrote:
> > Queued, thanks.
>
> Paolo,
>
> Are you grabbing this for 6.3 or 6.4?  If it's for 6.4, what is your plan for 6.4?
> I assumed we were taking the same approach as we did for 6.3, where you handle the
> current cycle (stabilizing 6.3) and I focus on the next cycle (building 6.4).


This one is for 6.4. What we did for 6.3 included me merging a handful
of series that were not included in the previous merge window; so
that's what I did today. If that's okay for you, once the -rc3 pull
request is sent (probably tomorrow) I will push to kvm/next and that
will be it.

I do plan to review a few other outstanding series of yours,
especially the MSRs and the reboot ones.

Paolo
  
Sean Christopherson March 15, 2023, 12:05 a.m. UTC | #4
On Tue, Mar 14, 2023, Paolo Bonzini wrote:
> Il mar 14 mar 2023, 15:29 Sean Christopherson <seanjc@google.com> ha scritto:
> >
> > On Tue, Mar 14, 2023, Paolo Bonzini wrote:
> > > Queued, thanks.
> >
> > Paolo,
> >
> > Are you grabbing this for 6.3 or 6.4?  If it's for 6.4, what is your plan for 6.4?
> > I assumed we were taking the same approach as we did for 6.3, where you handle the
> > current cycle (stabilizing 6.3) and I focus on the next cycle (building 6.4).
> 
> 
> This one is for 6.4. What we did for 6.3 included me merging a handful
> of series that were not included in the previous merge window; so
> that's what I did today. If that's okay for you, once the -rc3 pull
> request is sent (probably tomorrow) I will push to kvm/next and that
> will be it.

Works for me, thanks!