]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
KVM: VMX: Move core VMXON enablement to kernel
authorSean Christopherson <seanjc@google.com>
Sat, 14 Feb 2026 01:26:52 +0000 (17:26 -0800)
committerSean Christopherson <seanjc@google.com>
Wed, 4 Mar 2026 16:52:42 +0000 (08:52 -0800)
commit920da4f75519a3fa3fe2fc25458445b561653610
treef76d059d9ff887282f512ddead18c786a27e523b
parent95e4adb24ff6e876f6d2b960cf922d3c969d4dc4
KVM: VMX: Move core VMXON enablement to kernel

Move the innermost VMXON+VMXOFF logic out of KVM and into to core x86 so
that TDX can (eventually) force VMXON without having to rely on KVM being
loaded, e.g. to do SEAMCALLs during initialization.

Opportunistically update the comment regarding emergency disabling via NMI
to clarify that virt_rebooting will be set by _another_ emergency callback,
i.e. that virt_rebooting doesn't need to be set before VMCLEAR, only
before _this_ invocation does VMXOFF.

Acked-by: Dave Hansen <dave.hansen@linux.intel.com>
Tested-by: Chao Gao <chao.gao@intel.com>
Reviewed-by: Dan Williams <dan.j.williams@intel.com>
Tested-by: Sagi Shahar <sagis@google.com>
Link: https://patch.msgid.link/20260214012702.2368778-7-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/events/intel/pt.c
arch/x86/include/asm/virt.h
arch/x86/kvm/vmx/vmx.c
arch/x86/virt/hw.c