KVM: VMX: Expose nested_vmx_allowed() to nested VMX as a non-inline
authorSean Christopherson <sean.j.christopherson@intel.com>
Mon, 3 Dec 2018 21:53:17 +0000 (13:53 -0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 14 Dec 2018 16:59:45 +0000 (17:59 +0100)
commit7c97fcb3b68cd4d48a071bc1929c753d255dea47
tree03e3109ab7a0f87419594f6d74ee00638c4f84cc
parent97b7ead392637247569818b6603e54b0a6277dd0
KVM: VMX: Expose nested_vmx_allowed() to nested VMX as a non-inline

Exposing only the function allows @nested, i.e. the module param, to be
statically defined in vmx.c, ensuring we aren't unnecessarily checking
said variable in the nested code.  nested_vmx_allowed() is exposed due
to the need to verify nested support in vmx_{get,set}_nested_state().
The downside is that nested_vmx_allowed() likely won't be inlined in
vmx_{get,set}_nested_state(), but that should be a non-issue as they're
not a hot path.  Keeping vmx_{get,set}_nested_state() in vmx.c isn't a
viable option as they need access to several nested-only functions.

Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx/vmx.c
arch/x86/kvm/vmx/vmx.h