Skip to content

Commit 8e1c181

Browse files
Sheng Yangavikivity
authored andcommitted
KVM: VMX: Disable VMX when system shutdown
Intel TXT(Trusted Execution Technology) required VMX off for all cpu to work when system shutdown. CC: Joseph Cihula <joseph.cihula@intel.com> Signed-off-by: Sheng Yang <sheng@linux.intel.com> Signed-off-by: Avi Kivity <avi@redhat.com>
1 parent 522c68c commit 8e1c181

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

virt/kvm/kvm_main.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2391,15 +2391,15 @@ EXPORT_SYMBOL_GPL(kvm_handle_fault_on_reboot);
23912391
static int kvm_reboot(struct notifier_block *notifier, unsigned long val,
23922392
void *v)
23932393
{
2394-
if (val == SYS_RESTART) {
2395-
/*
2396-
* Some (well, at least mine) BIOSes hang on reboot if
2397-
* in vmx root mode.
2398-
*/
2399-
printk(KERN_INFO "kvm: exiting hardware virtualization\n");
2400-
kvm_rebooting = true;
2401-
on_each_cpu(hardware_disable, NULL, 1);
2402-
}
2394+
/*
2395+
* Some (well, at least mine) BIOSes hang on reboot if
2396+
* in vmx root mode.
2397+
*
2398+
* And Intel TXT required VMX off for all cpu when system shutdown.
2399+
*/
2400+
printk(KERN_INFO "kvm: exiting hardware virtualization\n");
2401+
kvm_rebooting = true;
2402+
on_each_cpu(hardware_disable, NULL, 1);
24032403
return NOTIFY_OK;
24042404
}
24052405

0 commit comments

Comments
 (0)