KVM: nVMX: Call nested_vmx_setup_ctls_msrs() iff @nested is true
authorSean Christopherson <sean.j.christopherson@intel.com>
Mon, 3 Dec 2018 21:53:13 +0000 (13:53 -0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 14 Dec 2018 16:17:59 +0000 (17:17 +0100)
commit3e8eacccae9d998e0f5074f4fe411c747d85dfd8
tree5a9b5272b65b26f3615d550e06d7654635748e11
parente4027cfafd7846cf795217ce6d1829728d95ad89
KVM: nVMX: Call nested_vmx_setup_ctls_msrs() iff @nested is true

...so that it doesn't need access to @nested. The only case where the
provided struct isn't already zeroed is the call from vmx_create_vcpu()
as setup_vmcs_config() zeroes the struct in the other use cases.  This
will allow @nested to be statically defined in vmx.c, i.e. this removes
the last direct reference from nested code.

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