Re: [PATCH 4/4 v3] KVM: VMX: VMXON/VMXOFF usage changes.

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

 



On 05/07/2010 05:43 AM, Xu, Dongxiao wrote:
From: Dongxiao Xu<dongxiao.xu@xxxxxxxxx>

SDM suggests VMXON should be called before VMPTRLD, and VMXOFF
should be called after doing VMCLEAR.

Therefore in vmm coexistence case, we should firstly call VMXON
before any VMCS operation, and then call VMXOFF after the
operation is done.


@@ -4118,7 +4143,10 @@ static void vmx_cpuid_update(struct kvm_vcpu *vcpu)
  	struct kvm_cpuid_entry2 *best;
  	struct vcpu_vmx *vmx = to_vmx(vcpu);
  	u32 exec_control;
+	int cpu;

+	cpu = get_cpu();
+	vmx_vcpu_load(&vmx->vcpu, cpu);
  	vmx->rdtscp_enabled = false;
  	if (vmx_rdtscp_supported()) {
  		exec_control = vmcs_read32(SECONDARY_VM_EXEC_CONTROL);
@@ -4133,6 +4161,9 @@ static void vmx_cpuid_update(struct kvm_vcpu *vcpu)
  			}
  		}
  	}
+	vmx_vcpu_put(&vmx->vcpu);
+	put_cpu();
+
  }

  static void vmx_set_supported_cpuid(u32 func, struct kvm_cpuid_entry2 *entry)

I'm not sure why this is needed. vmx_cpuid_update() is called from a vcpu ioctl which should have called vcpu_load() before.

Apart from that, everything looks good for merging.

--
error compiling committee.c: too many arguments to function

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