Re: Interested in working for GSoC project

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2013-04-13 20:24, Mohit Dhingra wrote:
> Hi All,
> 
> I am Mohit Dhingra, planning to work in GSoC project "Improve nested
> virtualization support for x86". I got in touch with Jan
> (jan.kiszka@xxxxxx) few days back.
> 
> As suggested by him, I am trying to write a simple unit test which
> tests the "vmx" functions. To start with, I have written a small code
> which checks whether "vmx" functionality is available on the current
> processor or not[1].
> 
> I have used "cpuid" to check the VMX functionality. Before executing
> cpuid, eax is set to 1. cpuid then puts the feature flags in ecx and
> edx registers. Bit5 in ecx register tells whether VMX feature is
> present or not. I am attaching the patch along with this mail.

Hint regarding assembly usage: Try to minimize the number of
instructions. Check, e.g., how the kernel implements cpuid. Result
evaluation can perfectly be done in C.

> 
> But there is a problem that I am facing. CPUID behaves differently
> when I run it using qemu-kvm, and when I run it directly in user mode.
>  Please check the below output. It would be great if someone can
> please help me out.

To enable nested VMX, you need to tweak two things: first, you need
nested=1 as parameter for kvm_intel. And, second, you have to select a
CPU type via QEMU (-cpu) that supports VMX or explicitly add that
feature to the selected CPU (-cpu ...,+vmx).

By default, only core[2]duo and the synthetic KVM type "host" come with
VMX enabled, not much more modern Intel CPU like Nehalem or SandyBridge.
That's inconsistent, and if you want to fix something in QEMU, you could
check which CPU types in qemu/target-i386/cpu.c lack the flag and post a
patch to change this.

Jan

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux