Re: [PATCH 4/6] KVM: SVM: Propagate requested TSC frequency on vcpu init

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

 



On 03/24/2011 09:40 AM, Joerg Roedel wrote:
This patch implements the propagation of the VM
virtual_tsc_khz into each vcpu data-structure to enable the
tsc-scaling feature.
  static void svm_write_tsc_offset(struct kvm_vcpu *vcpu, u64 offset)
  {
  	struct vcpu_svm *svm = to_svm(vcpu);
@@ -1093,6 +1123,9 @@ static struct kvm_vcpu *svm_create_vcpu(struct kvm *kvm, unsigned int id)
  	if (err)
  		goto free_svm;

+	if (!svm_vcpu_init_tsc(kvm, svm))
+		goto uninit;
+

Need to set err.

I'm not really happy about failing on vcpu creation. Prefer to fail when setting the frequency.

Another issue is that we fail when the frequency is out of range, but not when it's wierd enough so we lose a lot of accuracy. I guess it won't matter in practice.

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