From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: Re: [PATCH] KVM: VMX: Inform user about INTEL_TXT dependency Date: Sun, 14 Nov 2010 11:41:52 +0100 Message-ID: <4CDFBCF0.2060006@web.de> References: <4CDFA967.7000508@web.de> <4CDFBA43.60808@redhat.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigD7A436992B70B2C602DE1664" Cc: Marcelo Tosatti , kvm , Shane Wang To: Avi Kivity Return-path: Received: from fmmailgate03.web.de ([217.72.192.234]:53819 "EHLO fmmailgate03.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755027Ab0KNKl6 (ORCPT ); Sun, 14 Nov 2010 05:41:58 -0500 In-Reply-To: <4CDFBA43.60808@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigD7A436992B70B2C602DE1664 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Am 14.11.2010 11:30, Avi Kivity wrote: > On 11/14/2010 11:18 AM, Jan Kiszka wrote: >> 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 kern= el >> 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; >> + } >> } >> >=20 > Maybe reword to an instruction? >=20 > Something like >=20 > kvm: TXT enabled in the bios. Either disable TXT in the bios, or > enable CONFIG_INTEL_TXT in your kernel. >=20 I always get an aching head when thinking about these dependency: Does FEATURE_CONTROL_LOCKED && !FEATURE_CONTROL_VMXON_ENABLED_OUTSIDE_SMX imply that the BIOS uses TXT? Or could it also mean that it just disabled VT-x explicitly? As CONFIG_INTEL_TXT is off, we do not know if tboot_enabled is off as well. Jan --------------enigD7A436992B70B2C602DE1664 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.15 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/ iEYEARECAAYFAkzfvPUACgkQitSsb3rl5xSDCwCg42QmV58WW+voiTqZGnKsE8gP rqQAoIxgtH34ttlrMdwJy25aEbobgbTG =5JJP -----END PGP SIGNATURE----- --------------enigD7A436992B70B2C602DE1664--