Skip to content

Commit b5fd068

Browse files
Costas Argyrissean-jc
authored andcommitted
KVM: VMX: Reinstate __exit attribute for vmx_exit()
Tag vmx_exit() with __exit now that it's no longer used by vmx_init(). Commit a7b9020 ("x86/l1tf: Handle EPT disabled state proper") dropped the "__exit" attribute from vmx_exit() because vmx_init() was changed to call vmx_exit(). However, commit e32b120 ("KVM: VMX: Do _all_ initialization before exposing /dev/kvm to userspace") changed vmx_init() to call __vmx_exit() instead of the "full" vmx_exit(). This made it possible to mark vmx_exit() as "__exit" again, as it originally was, and enjoy the benefits that it provides (the function can be discarded from memory in situations where it cannot be called, like the module being built-in or module unloading being disabled in the kernel). Signed-off-by: Costas Argyris <costas.argyris@amd.com> Link: https://lore.kernel.org/r/20250102154050.2403-1-costas.argyris@amd.com [sean: massage changelog] Signed-off-by: Sean Christopherson <seanjc@google.com>
1 parent ca0245d commit b5fd068

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/x86/kvm/vmx/vmx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8605,7 +8605,7 @@ static void __vmx_exit(void)
86058605
vmx_cleanup_l1d_flush();
86068606
}
86078607

8608-
static void vmx_exit(void)
8608+
static void __exit vmx_exit(void)
86098609
{
86108610
kvm_exit();
86118611
__vmx_exit();

0 commit comments

Comments
 (0)