public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] KVM: VMX: Inform user about INTEL_TXT dependency
@ 2010-11-14  9:18 Jan Kiszka
  2010-11-14 10:30 ` Avi Kivity
  0 siblings, 1 reply; 13+ messages in thread
From: Jan Kiszka @ 2010-11-14  9:18 UTC (permalink / raw)
  To: Avi Kivity, Marcelo Tosatti; +Cc: kvm, Shane Wang

From: Jan Kiszka <jan.kiszka@siemens.com>

Without CONFIG_INTEL_TXT, the user must not enable this feature in the
BIOS. Otherwise, KVM will not work. Explain this dependency via a kernel
log message.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 arch/x86/kvm/vmx.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 9367abc..ebafd57 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -1306,8 +1306,13 @@ static __init int vmx_disabled_by_bios(void)
 			&& tboot_enabled())
 			return 1;
 		if (!(msr & FEATURE_CONTROL_VMXON_ENABLED_OUTSIDE_SMX)
-			&& !tboot_enabled())
+			&& !tboot_enabled()) {
+#ifndef CONFIG_INTEL_TXT
+			printk(KERN_INFO "kvm: if TXT is enabled in the bios, "
+					 "kvm depends on CONFIG_INTEL_TXT\n");
+#endif
 			return 1;
+		}
 	}
 
 	return 0;
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 13+ messages in thread
* [PATCH]KVM: VMX: Inform user about INTEL_TXT dependency
@ 2010-11-17  3:40 Shane Wang
  2010-11-17  7:56 ` Jan Kiszka
  2010-11-18 15:28 ` Marcelo Tosatti
  0 siblings, 2 replies; 13+ messages in thread
From: Shane Wang @ 2010-11-17  3:40 UTC (permalink / raw)
  To: avi, mtosatti; +Cc: jan.kiszka, kvm, joseph.cihula, 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.

Signed-off-by: Shane Wang <shane.wang@intel.com>
---
 arch/x86/kvm/vmx.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff -r b1a2deff4c64 arch/x86/kvm/vmx.c
--- a/arch/x86/kvm/vmx.c	Wed Nov 17 12:47:42 2010 -0500
+++ b/arch/x86/kvm/vmx.c	Wed Nov 17 12:49:52 2010 -0500
@@ -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;

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2010-11-18 16:15 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-14  9:18 [PATCH] KVM: VMX: Inform user about INTEL_TXT dependency Jan Kiszka
2010-11-14 10:30 ` Avi Kivity
2010-11-14 10:41   ` Jan Kiszka
2010-11-14 11:02     ` Avi Kivity
2010-11-16  4:48       ` Wang, Shane
2010-11-16 10:22         ` Jan Kiszka
2010-11-16 13:02           ` Cihula, Joseph
2010-11-16 13:19             ` Jan Kiszka
2010-11-17  1:30               ` Wang, Shane
  -- strict thread matches above, loose matches on Subject: below --
2010-11-17  3:40 [PATCH]KVM: " Shane Wang
2010-11-17  7:56 ` Jan Kiszka
2010-11-18  0:35   ` Wang, Shane
2010-11-18 15:28 ` Marcelo Tosatti

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox