Re: [PATCH 02/28] nVMX: Add VMX and SVM to list of supported cpuid features

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

 



On Wed, Dec 08, 2010 at 07:00:59PM +0200, Nadav Har'El wrote:
> If the "nested" module option is enabled, add the "VMX" CPU feature to the
> list of CPU features KVM advertises with the KVM_GET_SUPPORTED_CPUID ioctl.
> 
> Qemu uses this ioctl, and intersects KVM's list with its own list of desired
> cpu features (depending on the -cpu option given to qemu) to determine the
> final list of features presented to the guest.
> 
> Signed-off-by: Nadav Har'El <nyh@xxxxxxxxxx>
> ---
>  arch/x86/kvm/vmx.c |    2 ++
>  1 file changed, 2 insertions(+)
> 
> --- .before/arch/x86/kvm/vmx.c	2010-12-08 18:56:48.000000000 +0200
> +++ .after/arch/x86/kvm/vmx.c	2010-12-08 18:56:48.000000000 +0200
> @@ -4284,6 +4284,8 @@ static void vmx_cpuid_update(struct kvm_
>  
>  static void vmx_set_supported_cpuid(u32 func, struct kvm_cpuid_entry2 *entry)
>  {
> +	if (func == 1 && nested)
> +		entry->ecx |= bit(X86_FEATURE_VMX);
>  }
>  
>  static struct kvm_x86_ops vmx_x86_ops = {

This patch should be the last one in your series because VMX should be
fully supported before it is reported to userspace.

	Joerg

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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