Re: [PATCH kvm-unit-tests v2] KVM: x86: add hyperv clock test case

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

 




On 23/05/2016 23:55, Marcelo Tosatti wrote:
>> > +
>> > +	barrier();
> ***
> 
> 
>> > +	if (t >= end) {
>> > +		long long ref = rdmsr(HV_X64_MSR_TIME_REF_COUNT);
>> > +		if (i == 0)
>> > +			printf("Time reference MSR drift: %lld\n\n", ref - end);
>> > +		ok[i] &= (ref - end) > -5 && (ref - end) < 5;
> This is prone to fail: guest can be scheduled at "***" above and 
> test will fail.

Indeed.

> The [-5,5] comes from the standard?

No, it simply should be very small because the two are counting the same
time.

Thanks,

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