KVM: VMX: Initialize vmx->guest_msrs[] right after allocation
authorXiaoyao Li <xiaoyao.li@intel.com>
Sun, 20 Oct 2019 09:11:00 +0000 (17:11 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 22 Oct 2019 11:46:12 +0000 (13:46 +0200)
commit4be5341026246870818e28b53202b001426a5aec
tree07209105b24951eeef57983ab8498a295ef28e41
parent3c0f4be1f33b25bd28be1672ecb53627577c0899
KVM: VMX: Initialize vmx->guest_msrs[] right after allocation

Move the initialization of vmx->guest_msrs[] from vmx_vcpu_setup() to
vmx_create_vcpu(), and put it right after its allocation.

This also is the preperation for next patch.

Signed-off-by: Xiaoyao Li <xiaoyao.li@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx/vmx.c