KVM: x86: Tag kvm_mmu_x86_module_init() with __init
authorSean Christopherson <seanjc@google.com>
Wed, 3 Aug 2022 22:49:55 +0000 (22:49 +0000)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 10 Aug 2022 19:08:24 +0000 (15:08 -0400)
commit982bae43f11c37b51d2f1961bb25ef7cac3746fa
tree85dc7ef4b22322b91c1ab4569d5a04d45c78e9cf
parent4ac5b4237793a6db791999edd53f0396c04053cd
KVM: x86: Tag kvm_mmu_x86_module_init() with __init

Mark kvm_mmu_x86_module_init() with __init, the entire reason it exists
is to initialize variables when kvm.ko is loaded, i.e. it must never be
called after module initialization.

Fixes: 1d0e84806047 ("KVM: x86/mmu: Resolve nx_huge_pages when kvm.ko is loaded")
Cc: stable@vger.kernel.org
Reviewed-by: Kai Huang <kai.huang@intel.com>
Tested-by: Michael Roth <michael.roth@amd.com>
Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20220803224957.1285926-2-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/mmu/mmu.c