Nested VMX support in qemu and kvm

Nested VMX support in qemu and kvm

Nadav Har'El nyh at math.technion.ac.il
Tue Sep 6 15:15:41 IDT 2011


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.

> 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 at 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.



More information about the Linux-il mailing list