From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: [PATCH] KVM: VMX: Inform user about INTEL_TXT dependency Date: Sun, 14 Nov 2010 10:18:31 +0100 Message-ID: <4CDFA967.7000508@web.de> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7BIT Cc: kvm , Shane Wang To: Avi Kivity , Marcelo Tosatti Return-path: Received: from fmmailgate03.web.de ([217.72.192.234]:36328 "EHLO fmmailgate03.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754330Ab0KNJSd (ORCPT ); Sun, 14 Nov 2010 04:18:33 -0500 Sender: kvm-owner@vger.kernel.org List-ID: From: Jan Kiszka 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 --- 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