[Qemu-devel] is it possible to run KVM module inside a qemu VM
Hi, I know there exists nested KVM in the kernel tree such that a KVM hypervisor can run inside a guest. Now I am wondering if it is possible to load the kvm module in a qemu VM (-no-kvm). So I started a qemu VM using the following command qemu-system-x86_64 -hda os.img -no-kvm -cpu qemu64,+vmx After the VM is boosted, I check /pro/cpuinfo to see if vmx presents in the CPU flags lists in the VM. However, instead of vmx, I saw a hypervisor item. Then in the VM I try to load the kvm module by modprobe kvm_intel, it reports not supported. Any comment on this? Thanks in advance. - Steven
Re: [Qemu-devel] is it possible to run KVM module inside a qemu VM
On Sun, Apr 29, 2012, Steven wrote about is it possible to run KVM module inside a qemu VM: Hi, I know there exists nested KVM in the kernel tree such that a KVM hypervisor can run inside a guest. Now I am wondering if it is possible to load the kvm module in a qemu VM (-no-kvm). So I started a qemu VM using the following command No, I believe this is NOT possible. KVM, as the top (L0) hypervisor, implements the VMX instructions for the L1 guest using the hosts' VMX. Qemu, on the other hand, does not have VMX emulation at all. Note that before you set out to add VMX instructions emulation, you need to also consider the option of emulating SVM (AMD's virtualization extensions) instead of VMX - even on Intel hosts. I believe (though I didn't consider this too carefully) this will be easier to implement, as in many respects, SVM is simpler than VMX. -- Nadav Har'El|Sunday, Apr 29 2012, n...@math.technion.ac.il |- Phone +972-523-790466, ICQ 13349191 |Guarantee: this email is 100% free of http://nadav.harel.org.il |magnetic monopoles, or your money back!
Re: [Qemu-devel] is it possible to run KVM module inside a qemu VM
On 29.04.2012, at 12:48, Nadav Har'El wrote: On Sun, Apr 29, 2012, Steven wrote about is it possible to run KVM module inside a qemu VM: Hi, I know there exists nested KVM in the kernel tree such that a KVM hypervisor can run inside a guest. Now I am wondering if it is possible to load the kvm module in a qemu VM (-no-kvm). So I started a qemu VM using the following command No, I believe this is NOT possible. KVM, as the top (L0) hypervisor, implements the VMX instructions for the L1 guest using the hosts' VMX. Qemu, on the other hand, does not have VMX emulation at all. Note that before you set out to add VMX instructions emulation, you need to also consider the option of emulating SVM (AMD's virtualization extensions) instead of VMX - even on Intel hosts. I believe (though I didn't consider this too carefully) this will be easier to implement, as in many respects, SVM is simpler than VMX. SVM is already implemented in TCG, though the support may not be 100% compatible to real hardware ;). Alex