All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Christoffer Dall <christofferdall@gmail.com>
Cc: Jintack Lim <jintack@cs.columbia.edu>,
	KVM General <kvm@vger.kernel.org>,
	Shih-Wei Li <shihwei@cs.columbia.edu>
Subject: Re: rdtsc() in kvm-unit-tests on x86
Date: Mon, 10 Aug 2015 15:58:08 +0200	[thread overview]
Message-ID: <55C8ADF0.8040204@redhat.com> (raw)
In-Reply-To: <CAEDV+g+hwvSqWUjNAKcJVcTf-6vXx5j+YiN=aaYKJbo=pmWcEw@mail.gmail.com>



On 10/08/2015 11:42, Christoffer Dall wrote:
> 
> Thanks for the reply.
> 
> On this note, is there an easy mechanism on x86 to obtain a TSC which is
> synchronized across PCPUs and between the host and the guest?
> 
> We can use the physical arch timer counter on arm64, but I'm not sure if
> there's something similar on x86?

Yes, you just use the TSC. :)  However, you first have to check that the
TSC is consistent across CPUs.  On older machines it's not, but the
kernel can detect it.

Paolo

> This is useful to trace the flow of events over an SMP system in detail.

  parent reply	other threads:[~2015-08-10 13:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2015-08-10 14:14       ` Jintack Lim
2015-08-10 14:47         ` Paolo Bonzini
2015-08-10 15:38           ` Jintack Lim

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55C8ADF0.8040204@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=christofferdall@gmail.com \
    --cc=jintack@cs.columbia.edu \
    --cc=kvm@vger.kernel.org \
    --cc=shihwei@cs.columbia.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.