KVM: x86: Move guts of kvm_arch_init() to standalone helper
authorSean Christopherson <seanjc@google.com>
Wed, 30 Nov 2022 23:08:57 +0000 (23:08 +0000)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 29 Dec 2022 20:41:00 +0000 (15:41 -0500)
commit4f8396b96a9fc672964842fe7adbe8ddca8a3adf
tree94e09e060a64396723f1484363c69ec524141e72
parent451d39e8006111c4449830e01ec460024bf58817
KVM: x86: Move guts of kvm_arch_init() to standalone helper

Move the guts of kvm_arch_init() to a new helper, kvm_x86_vendor_init(),
so that VMX can do _all_ arch and vendor initialization before calling
kvm_init().  Calling kvm_init() must be the _very_ last step during init,
as kvm_init() exposes /dev/kvm to userspace, i.e. allows creating VMs.

No functional change intended.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20221130230934.1014142-14-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/svm/svm.c
arch/x86/kvm/vmx/vmx.c
arch/x86/kvm/x86.c