mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
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 <[email protected]> Signed-off-by: Sheng Yang <[email protected]> Signed-off-by: Avi Kivity <[email protected]>
This commit is contained in:
parent
522c68c441
commit
8e1c18157d
1 changed files with 9 additions and 9 deletions
|
|
@ -2391,15 +2391,15 @@ EXPORT_SYMBOL_GPL(kvm_handle_fault_on_reboot);
|
|||
static int kvm_reboot(struct notifier_block *notifier, unsigned long val,
|
||||
void *v)
|
||||
{
|
||||
if (val == SYS_RESTART) {
|
||||
/*
|
||||
* Some (well, at least mine) BIOSes hang on reboot if
|
||||
* in vmx root mode.
|
||||
*/
|
||||
printk(KERN_INFO "kvm: exiting hardware virtualization\n");
|
||||
kvm_rebooting = true;
|
||||
on_each_cpu(hardware_disable, NULL, 1);
|
||||
}
|
||||
/*
|
||||
* Some (well, at least mine) BIOSes hang on reboot if
|
||||
* 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;
|
||||
on_each_cpu(hardware_disable, NULL, 1);
|
||||
return NOTIFY_OK;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue