Skip to contentSkip to conversation

KVM: VMX: Disable VMX when system shutdown

PATCH Applied Sheng Yang 3 participants 3 messages Apr 29, 2009 – Apr 30, 2009 KVM

lore
Share & tools
lore

Sheng Yang

author
#0 lore raw

PATCH 1/1 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]>
---
 virt/kvm/kvm_main.c |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)
virt/kvm/kvm_main.c +9 -9
index 3265566..2b73e19 100644
@@ -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;
 }
 
Signature · 1 line
1.5.4.5
Applied
#1 lore raw
Quoted 3 lines · Sheng Yang

Intel TXT(Trusted Execution Technology) required VMX off for all cpu to work when system shutdown.

Applied, thanks.

Is this needed for 2.6.30 and -stable? That is, is the code that enables TXT in 2.6.30 and below or in the BIOS? Or is it new code not yet merged?

Signature · 1 line
error compiling committee.c: too many arguments to function
#2 lore raw
Quoted 8 lines

From: Avi Kivity [mailto:[email protected]]
Sent: Thursday, April 30, 2009 5:31 AM

Quoted 3 lines · Sheng Yang

Intel TXT(Trusted Execution Technology) required VMX off for all cpu to work when system shutdown.

Quoted 5 lines

Applied, thanks.

Is this needed for 2.6.30 and -stable? That is, is the code that enables TXT in 2.6.30 and below or in the BIOS? Or is it new code not yet merged?

The TXT code will not get merged in 2.6.30, though it will hopefully make it soon thereafter. So it would be fine to put it in 2.6.31.

Joe