public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Jan Kiszka <jan.kiszka@web.de>
Cc: Marcelo Tosatti <mtosatti@redhat.com>, kvm <kvm@vger.kernel.org>,
	Shane Wang <shane.wang@intel.com>
Subject: Re: [PATCH] KVM: VMX: Inform user about INTEL_TXT dependency
Date: Sun, 14 Nov 2010 13:02:59 +0200	[thread overview]
Message-ID: <4CDFC1E3.3080003@redhat.com> (raw)
In-Reply-To: <4CDFBCF0.2060006@web.de>

On 11/14/2010 12:41 PM, Jan Kiszka wrote:
> Am 14.11.2010 11:30, Avi Kivity wrote:
> >  On 11/14/2010 11:18 AM, Jan Kiszka wrote:
> >>  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;
> >>  +        }
> >>        }
> >>
> >
> >  Maybe reword to an instruction?
> >
> >  Something like
> >
> >    kvm: TXT enabled in the bios.  Either disable TXT in the bios, or
> >  enable CONFIG_INTEL_TXT in your kernel.
> >
>
> 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?

Probably the latter, at least that's what we took it to mean before it 
was renamed to that long string.

> As CONFIG_INTEL_TXT is off, we do not know if
> tboot_enabled is off as well.

I guess, if FEATURE_CONTROL_VMXON_ENABLED_INSIDER_SMX_YADA_YADA_YADA is 
set, then the bios wants us to enable TXT.  But if both bits are clear, 
the bios really doesn't want us to play with vmx.  But it would be good 
to get Intel guidance before we pass our confusion on to users.

-- 
error compiling committee.c: too many arguments to function


  reply	other threads:[~2010-11-14 11:03 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4CDFC1E3.3080003@redhat.com \
    --to=avi@redhat.com \
    --cc=jan.kiszka@web.de \
    --cc=kvm@vger.kernel.org \
    --cc=mtosatti@redhat.com \
    --cc=shane.wang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox