Re: Fwd: [KVM TSC emulation 6/9] Allow adjust_tsc_offset to be in host or guest cycles

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

 



On Tue, Jun 21, 2011 at 05:22:29AM -0700, Zachary Amsden wrote:
> -static void svm_adjust_tsc_offset(struct kvm_vcpu *vcpu, s64 adjustment)
> +static void svm_adjust_tsc_offset(struct kvm_vcpu *vcpu, s64 adjustment, bool host)
>  {
>  	struct vcpu_svm *svm = to_svm(vcpu);
>
> +	WARN_ON(adjustment<  0);
> +	if (host)
> +		adjustment = svm_scale_tsc(vcpu, adjustment);
> +

This is not going to work out with tsc-scaling. The tsc-offset is
applied _after_ the hardware-tsc. Just scaling the offset with the same
factor will not give you the hardware tsc-value you expect.

	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