Nested VMX support in qemu and kvm
On Tue, Sep 6, 2011 at 3:15 PM, Nadav Har'El <email@example.com> wrote:
On Tue, Sep 06, 2011, Kfir Lavi wrote about "Nested VMX support in qemu and kvm":
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
> 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,
> 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
Nadav Har'El * * * * * * * * * * * *| * * * *Tuesday, Sep *6 2011, 7 Elul 5771
firstname.lastname@example.org * * * * * * |-----------------------------------------
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.