提交 8e1c1815 编写于 作者: S Sheng Yang 提交者: Avi Kivity

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: NSheng Yang <sheng@linux.intel.com>
Signed-off-by: NAvi Kivity <avi@redhat.com>
上级 522c68c4
...@@ -2391,15 +2391,15 @@ EXPORT_SYMBOL_GPL(kvm_handle_fault_on_reboot); ...@@ -2391,15 +2391,15 @@ EXPORT_SYMBOL_GPL(kvm_handle_fault_on_reboot);
static int kvm_reboot(struct notifier_block *notifier, unsigned long val, static int kvm_reboot(struct notifier_block *notifier, unsigned long val,
void *v) void *v)
{ {
if (val == SYS_RESTART) { /*
/* * Some (well, at least mine) BIOSes hang on reboot if
* Some (well, at least mine) BIOSes hang on reboot if * in vmx root mode.
* in vmx root mode. *
*/ * And Intel TXT required VMX off for all cpu when system shutdown.
printk(KERN_INFO "kvm: exiting hardware virtualization\n"); */
kvm_rebooting = true; printk(KERN_INFO "kvm: exiting hardware virtualization\n");
on_each_cpu(hardware_disable, NULL, 1); kvm_rebooting = true;
} on_each_cpu(hardware_disable, NULL, 1);
return NOTIFY_OK; return NOTIFY_OK;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册