On 07/08/2015 21:19, Jintack Lim wrote:
> Hi all,
> 
> While I was looking at rdtsc() code in kvm-unit-tests (e.g. x86/vmexit.c),
> I was getting curious that out-of-order execution on the processor
> may make rdtsc() executed not in the place we expect.
> 
> Referring to this document from intel,
> http://www.intel.com/content/www/us/en/embedded/training/ia-32-ia-64-benchmark-code-execution-paper.html
> they suggested to use rdtscp instruction and other techniques to
> serialize reading tsc register.
> 
> I wonder how the serialization is achieved when using rdtsc() in
> kvm-unit-tests code.
> Or, maybe the serialization is not necessary for some reason?

kvm-unit-tests executes the instruction thousands of times, so any error
due to lack of serialization is lost in the noise.

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

Reply via email to