[PATCH]KVM: VMX: Inform user about INTEL_TXT dependency

Shane Wang
2010-11-17T03:40:20Z

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;