kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* rdtsc() in kvm-unit-tests on x86
@ 2015-08-07 19:19 Jintack Lim
  2015-08-10  9:02 ` Paolo Bonzini
  0 siblings, 1 reply; 6+ messages in thread
From: Jintack Lim @ 2015-08-07 19:19 UTC (permalink / raw)
  To: kvm; +Cc: Christoffer Dall, Shih-Wei Li

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?

Thanks,
Jintack


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-08-10 15:38 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-07 19:19 rdtsc() in kvm-unit-tests on x86 Jintack Lim
2015-08-10  9:02 ` Paolo Bonzini
     [not found]   ` <CAEDV+g+hwvSqWUjNAKcJVcTf-6vXx5j+YiN=aaYKJbo=pmWcEw@mail.gmail.com>
2015-08-10 13:58     ` Paolo Bonzini
2015-08-10 14:14       ` Jintack Lim
2015-08-10 14:47         ` Paolo Bonzini
2015-08-10 15:38           ` Jintack Lim

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).