Skip to contentSkip to conversation

KVM: VMX: Inform user about INTEL_TXT dependency

PATCH Applied Shane Wang 3 participants 4 messages Nov 17, 2010 – Nov 18, 2010

Subsystems (3)
lore
Share & tools
lore

Shane Wang

author
#0 lore raw

PATCH 1/1 KVM: VMX: Inform user about INTEL_TXT dependency

Inform user to either disable TXT in the BIOS or do TXT launch with tboot before enabling KVM since some BIOSes do not set FEATURE_CONTROL_VMXON_ENABLED_OUTSIDE_SMX bit when TXT is enabled.

---
 arch/x86/kvm/vmx.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
arch/x86/kvm/vmx.c +4 -1
diff -r b1a2deff4c64 arch/x86/kvm/vmx.c
@@ -1306,8 +1306,11 @@
 			&& tboot_enabled())
 			return 1;
 		if (!(msr & FEATURE_CONTROL_VMXON_ENABLED_OUTSIDE_SMX)
-			&& !tboot_enabled())
+			&& !tboot_enabled()) {
+			printk(KERN_WARNING "kvm: disable TXT in the BIOS or "
+				" activate TXT before enabling KVM\n");
 			return 1;
+		}
 	}
 
 	return 0;
#1 lore raw
Quoted 11 lines · Shane Wang

Inform user to either disable TXT in the BIOS or do TXT launch with tboot before enabling KVM since some BIOSes do not set FEATURE_CONTROL_VMXON_ENABLED_OUTSIDE_SMX bit when TXT is enabled.

---
 arch/x86/kvm/vmx.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff -r b1a2deff4c64 arch/x86/kvm/vmx.c

arch/x86/kvm/vmx.c line 1311

Quoted 7 lines
arch/x86/kvm/vmx.c +3 -1
@@ -1306,8 +1306,11 @@
 			&& tboot_enabled())
 			return 1;
 		if (!(msr & FEATURE_CONTROL_VMXON_ENABLED_OUTSIDE_SMX)
-			&& !tboot_enabled())
+			&& !tboot_enabled()) {
+			printk(KERN_WARNING "kvm: disable TXT in the BIOS or "
+				" activate TXT before enabling KVM\n");

Thought you wanted to let this message depend on ENABLED_INSIDE_SMX? However, if it's OK for you, I'm fine with it as well.

Thanks!
Jan

Quoted 5 lines
arch/x86/kvm/vmx.c +1 -0
 			return 1;
+		}
 	}
 
 	return 0;
Signature · 2 lines
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux
#2 lore raw

After discussing with Joe, we gave it up (i.e. not depend on enabled-inside-smx;)

Thanks.
Shane

-----Original Message-----
From: Jan Kiszka [mailto:[email protected]]
Sent: 2010年11月17日 15:56
To: Wang, Shane
Cc: [email protected]; [email protected]; [email protected]; Cihula, Joseph
Subject: Re: [PATCH]KVM: VMX: Inform user about INTEL_TXT dependency

Quoted 11 lines · Shane Wang

Inform user to either disable TXT in the BIOS or do TXT launch with tboot before enabling KVM since some BIOSes do not set FEATURE_CONTROL_VMXON_ENABLED_OUTSIDE_SMX bit when TXT is enabled.

---
 arch/x86/kvm/vmx.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff -r b1a2deff4c64 arch/x86/kvm/vmx.c

arch/x86/kvm/vmx.c line 1311

Quoted 7 lines
arch/x86/kvm/vmx.c +3 -1
@@ -1306,8 +1306,11 @@
 			&& tboot_enabled())
 			return 1;
 		if (!(msr & FEATURE_CONTROL_VMXON_ENABLED_OUTSIDE_SMX)
-			&& !tboot_enabled())
+			&& !tboot_enabled()) {
+			printk(KERN_WARNING "kvm: disable TXT in the BIOS or "
+				" activate TXT before enabling KVM\n");

Thought you wanted to let this message depend on ENABLED_INSIDE_SMX? However, if it's OK for you, I'm fine with it as well.

Thanks!
Jan

Quoted 5 lines
arch/x86/kvm/vmx.c +1 -0
 			return 1;
+		}
 	}
 
 	return 0;
Signature · 2 lines
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux
#3 lore raw
In reply to Shane Wang
Quoted 6 lines · Shane Wang

Inform user to either disable TXT in the BIOS or do TXT launch with tboot before enabling KVM since some BIOSes do not set FEATURE_CONTROL_VMXON_ENABLED_OUTSIDE_SMX bit when TXT is enabled.

---
 arch/x86/kvm/vmx.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Applied, thanks.