diff options
author | Sheng Yang <sheng@linux.intel.com> | 2009-04-28 23:09:04 -0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2009-06-10 04:48:50 -0400 |
commit | 8e1c18157d8772e65247ac55525a05a26b83fffe (patch) | |
tree | 5f2c1ad732d0b8145d79911c9878641529954340 /virt/kvm | |
parent | 522c68c4416de3cd3e11a9ff10d58e776a69ae1e (diff) |
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>
Diffstat (limited to 'virt/kvm')
-rw-r--r-- | virt/kvm/kvm_main.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 63d5fa2bc84a..29c0afb064da 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c | |||
@@ -2391,15 +2391,15 @@ EXPORT_SYMBOL_GPL(kvm_handle_fault_on_reboot); | |||
2391 | static int kvm_reboot(struct notifier_block *notifier, unsigned long val, | 2391 | static int kvm_reboot(struct notifier_block *notifier, unsigned long val, |
2392 | void *v) | 2392 | void *v) |
2393 | { | 2393 | { |
2394 | if (val == SYS_RESTART) { | 2394 | /* |
2395 | /* | 2395 | * Some (well, at least mine) BIOSes hang on reboot if |
2396 | * Some (well, at least mine) BIOSes hang on reboot if | 2396 | * in vmx root mode. |
2397 | * in vmx root mode. | 2397 | * |
2398 | */ | 2398 | * And Intel TXT required VMX off for all cpu when system shutdown. |
2399 | printk(KERN_INFO "kvm: exiting hardware virtualization\n"); | 2399 | */ |
2400 | kvm_rebooting = true; | 2400 | printk(KERN_INFO "kvm: exiting hardware virtualization\n"); |
2401 | on_each_cpu(hardware_disable, NULL, 1); | 2401 | kvm_rebooting = true; |
2402 | } | 2402 | on_each_cpu(hardware_disable, NULL, 1); |
2403 | return NOTIFY_OK; | 2403 | return NOTIFY_OK; |
2404 | } | 2404 | } |
2405 | 2405 | ||