From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1R1dKH-0004Cl-Nv for garchives@archives.gentoo.org; Thu, 08 Sep 2011 12:03:26 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D935721C1F4; Thu, 8 Sep 2011 12:03:13 +0000 (UTC) Received: from mail-vx0-f181.google.com (mail-vx0-f181.google.com [209.85.220.181]) by pigeon.gentoo.org (Postfix) with ESMTP id 7E77D21C082 for ; Thu, 8 Sep 2011 12:02:11 +0000 (UTC) Received: by vxh7 with SMTP id 7so655024vxh.40 for ; Thu, 08 Sep 2011 05:02:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=R+ucEA1akJUB2W8LE1Pxgar2AEdgFxxUoz5CtuqKlMo=; b=GAXQt3/0XxRQmVGn9N4sB2SItGGbRaSkx1CZE0VWagpaX31rV47cWBry9xvMM2YvnC GMaQr9A4wWFiTradpZkKuTymmWAdigYVn6zbu7n8tE6zIneOISNSfoFHI1uIOASey+jD cIliiWvXIFV/bp6hL9sj/R/OmrOpUUCpxMt9E= Received: by 10.52.67.145 with SMTP id n17mr571626vdt.167.1315483329586; Thu, 08 Sep 2011 05:02:09 -0700 (PDT) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Received: by 10.52.188.102 with HTTP; Thu, 8 Sep 2011 05:01:49 -0700 (PDT) In-Reply-To: <20110906121541.GA10041@fermat.math.technion.ac.il> References: <20110906121541.GA10041@fermat.math.technion.ac.il> From: Kfir Lavi Date: Thu, 8 Sep 2011 15:01:49 +0300 Message-ID: Subject: [gentoo-user] Re: Nested VMX support in qemu and kvm To: "Nadav Har'El" Cc: ILUG , gentoo-user@lists.gentoo.org Content-Type: multipart/alternative; boundary=20cf307f334a91668a04ac6cd464 X-Archives-Salt: X-Archives-Hash: beb5aef603822a871bdfef241afb3928 --20cf307f334a91668a04ac6cd464 Content-Type: text/plain; charset=UTF-8 On Tue, Sep 6, 2011 at 3:15 PM, Nadav Har'El wrote: > On Tue, Sep 06, 2011, Kfir Lavi wrote about "Nested VMX support in qemu and > kvm": > > Hi, > > Wow, I didn't expect to see a discussion about nested VMX in linux-il? > Any particular reason why you bring this up here, and not in the KVM > mailing list? > > > I'm trying to use a nested vm, but whatever I do, no vmx flag is in > > /proc/cpuinfo ? > > qemu-kvm -cpu host > > qemu-kvm -cpu host,+vmx > > qemu-kvm -cpu qemu64,+vmx > > As you can see in my original announcement, and also in > Documentation/virtual/kvm/nested-vmx.txt, nested VMX is still considered > experimental, and therefore must be enabled explictly not just in qemu > (which you did correctly) but also in the kernel module: you must load > the kvm-intel module as: > > insmod kvm-intel.ko nested=1 > > Since you didn't mention doing this, is it possible you forgot? > > If you get an error with the above insmod, it means you are using an old > version of KVM which didn't yet support nested VMX. Nested VMX was only > recently integrated with the main tree. > > > I'm running Gentoo with kernel 3.0.4 and > > I'm not sure what exactly 3.0.4 contains, but it might be too old to > contain nested VMX. Linux 3.0's cutoff date was already several months > ago, so I believe nested VMX only made it to Linux 3.1, not 3.0. > > Like I said, if insmod with "nested=1" fails, then you have too old > a module. You can get a newer kernel directly from the KVM repository. > > Yes you right, kernel linux-3.1-rc4 has this patch, and using the nested=1 parameter I'm able to use nested vmx. It is a really useful feature. (more info is in Documentation/virtual/kvm/nested-vmx.txt) Send my regards to the ppl in your team at IBM Hifa, Kfir > > I did saw some emails and patches on the net from Orit, Avi and Nadav > about > > nested vmx support, > > but it doesn't seems to work for me. > > After 11 (!) rounds of discussions spanning more than a year, Avi accepted > these patches and nested VMX is now part of the main KVM tree. So please > use the main KVM tree, not any of the old patches you find on the net, if > you can. > > Good luck, > Nadav. > > > -- > Nadav Har'El | Tuesday, Sep 6 2011, 7 Elul > 5771 > nyh@math.technion.ac.il > |----------------------------------------- > Phone +972-523-790466, ICQ 13349191 |An egotist is a person of low taste, > more > http://nadav.harel.org.il |interested in himself than in me. > --20cf307f334a91668a04ac6cd464 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


On Tue, Sep 6, 2011 at = 3:15 PM, Nadav Har'El <nyh@math.technion.ac.il> wrote:
On Tue, Sep 06, 2011, Kfir Lavi wrote about "Nested VMX support in qem= u and kvm":
> Hi,

Wow, I didn't expect to see a discussion about nested VMX in linux-il?<= br> Any particular reason why you bring this up here, and not in the KVM
mailing list?

> I'm trying to use a nested vm, but whatever I do, no vmx flag is i= n
> /proc/cpuinfo ?
> qemu-kvm -cpu host
> qemu-kvm -cpu host,+vmx
> qemu-kvm -cpu qemu64,+vmx

As you can see in my original announcement, and also in
Documentation/virtual/kvm/nested-vmx.txt, nested VMX is still considered experimental, and therefore must be enabled explictly not just in qemu
(which you did correctly) but also in the kernel module: you must load
the kvm-intel module as:

=C2=A0 =C2=A0 =C2=A0 =C2=A0insmod kvm-intel.ko nested=3D1

Since you didn't mention doing this, is it possible you forgot?

If you get an error with the above insmod, it means you are using an old version of KVM which didn't yet support nested VMX. Nested VMX was only=
recently integrated with the main tree.

> I'm running Gentoo with kernel 3.0.4 and

I'm not sure what exactly 3.0.4 contains, but it might be too old= to
contain nested VMX. Linux 3.0's cutoff date was already several months<= br> ago, so I believe nested VMX only made it to Linux 3.1, not 3.0.

Like I said, if insmod with "nested=3D1" fails, then you have too= old
a module. You can get a newer kernel directly from the KVM repository.

Yes you right, kernel=C2=A0 l= inux-3.1-rc4 has this patch, and using the nested=3D1
parameter I'm= able to use nested vmx.
It is a really useful feature.
(more info is= in Documentation/virtual/kvm/nested-vmx.txt)

Send my regards to the ppl in your team at IBM Hifa,
Kfir
=
> I did saw some emails and patches on the net from Orit, Avi and Nadav = about
> nested vmx support,
> but it doesn't seems to work for me.

After 11 (!) rounds of discussions spanning more than a year, Avi acc= epted
these patches and nested VMX is now part of the main KVM tree. So please use the main KVM tree, not any of the old patches you find on the net, if you can.

Good luck,
Nadav.


--
Nadav Har'El =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0| =C2=A0 =C2=A0 =C2=A0 =C2=A0Tuesday, Sep =C2=A0= 6 2011, 7 Elul 5771
nyh@math.technion.ac.il =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 |-----------------------------------= ------
Phone +972-523-79= 0466, ICQ 13349191 |An egotist is a person of low taste, more
http://nadav.harel.= org.il =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 |interested in himself than i= n me.

--20cf307f334a91668a04ac6cd464--