All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
	Sheng Yang <sheng@linux.intel.com>
Subject: Re: [PATCH 0 of 5] PV on HVM Xen
Date: Tue, 16 Mar 2010 11:26:14 -0700	[thread overview]
Message-ID: <4B9FCD46.5090705@goop.org> (raw)
In-Reply-To: <alpine.DEB.2.00.1003161747090.23661@kaball-desktop>

On 03/16/2010 11:06 AM, Stefano Stabellini wrote:
> the following is the interesting bit of the pvclock interface:
>
> static __always_inline
> u64 pvclock_get_nsec_offset(const struct pvclock_vcpu_time_info *src)
> {
> 	u64 delta = __native_read_tsc() - src->tsc_timestamp;
> 	return scale_delta(delta, src->tsc_to_system_mul, src->tsc_shift);
> }
>
>
> xen refreshes the values in pvclock_vcpu_time_info every EPOCH (1s),
> therefore if the value returned by pvclock_get_nsec_offset is greater
> than EPOCH than the patch is not present in xen.
>
> This is a simple way of detecting if the offset is taken into account or
> not and it works because the offset is the value returned by rdtsc in
> the host when the VM was created and we can be sure it corresponds to
> more than 1 sec.
>    

That seems pretty fragile.  I don't think EPOCH is part of the ABI, and 
I don't think we should be relying on it.

     J

  reply	other threads:[~2010-03-16 18:26 UTC|newest]

Thread overview: 68+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-10 15:46 [PATCH 0 of 5] PV on HVM Xen Stefano Stabellini
2010-03-10 17:33 ` [Xen-devel] " Pasi Kärkkäinen
2010-03-10 17:55   ` Stefano Stabellini
2010-03-10 19:45     ` Jeremy Fitzhardinge
2010-03-12  3:23 ` Sheng Yang
2010-03-12  3:23   ` Sheng Yang
2010-03-12 10:42   ` [Xen-devel] " Stefano Stabellini
2010-03-12 16:00     ` Stefano Stabellini
2010-03-15  4:05       ` Sheng Yang
2010-03-15  8:29         ` Sheng Yang
2010-03-15 12:22           ` Stefano Stabellini
2010-03-17  9:38             ` Sheng Yang
2010-03-17 14:18               ` Konrad Rzeszutek Wilk
2010-03-17 15:21               ` Stefano Stabellini
2010-03-17 16:13                 ` Jeremy Fitzhardinge
2010-03-18  1:30                   ` Sheng Yang
2010-03-19 20:38                     ` Jeremy Fitzhardinge
2010-03-22  6:26                       ` MSI proposal and work transfer...(was: Re: [PATCH 0 of 5] PV on HVM Xen) Sheng Yang
2010-03-23 20:47                         ` Jeremy Fitzhardinge
2010-03-24  8:19                           ` Sheng Yang
2010-03-23 23:16                         ` Stefano Stabellini
2010-03-24  8:25                           ` Sheng Yang
2010-03-18  2:19                 ` [PATCH 0 of 5] PV on HVM Xen Sheng Yang
2010-03-18 16:42                   ` Jeremy Fitzhardinge
2010-03-17 16:13               ` Jeremy Fitzhardinge
2010-03-15 12:28         ` Stefano Stabellini
2010-03-15 23:08           ` Jeremy Fitzhardinge
2010-03-15 23:24             ` Frank van der Linden
2010-03-16  0:32             ` Dan Magenheimer
2010-03-16  6:09               ` Sheng Yang
2010-03-16 16:46                 ` Dan Magenheimer
2010-03-16 11:07             ` Stefano Stabellini
2010-03-16 17:23               ` Jeremy Fitzhardinge
2010-03-16 17:32                 ` Stefano Stabellini
2010-03-16 17:41                   ` Jeremy Fitzhardinge
2010-03-16 18:06                     ` Stefano Stabellini
2010-03-16 18:26                       ` Jeremy Fitzhardinge [this message]
2010-03-16 18:37                         ` Stefano Stabellini
2010-03-17  8:51                           ` Sheng Yang
2010-03-17  9:18                             ` Sheng Yang
2010-03-17 15:17                               ` Stefano Stabellini
2010-03-17 18:20                                 ` Ian Campbell
2010-03-18  1:42                                   ` Sheng Yang
2010-03-18  1:35                                 ` Sheng Yang
2010-03-18 14:22                                   ` Stefano Stabellini
2010-03-18 16:50                                     ` Jeremy Fitzhardinge
2010-03-18 17:30                                 ` Jeremy Fitzhardinge
2010-03-12 21:53     ` [Xen-devel] " Jeremy Fitzhardinge
  -- strict thread matches above, loose matches on Subject: below --
2010-03-12 11:44 Boris Derzhavets
2010-03-12 11:59 ` Stefano Stabellini
2010-03-12 15:01   ` Boris Derzhavets
2010-03-12 15:08     ` Stefano Stabellini
2010-03-12 15:09       ` Boris Derzhavets
2010-03-12 20:10     ` Jeremy Fitzhardinge
2010-03-12 21:14       ` Boris Derzhavets
2010-03-12 21:22         ` Jeremy Fitzhardinge
2010-03-12 21:28           ` Boris Derzhavets
2010-03-12 21:25       ` Boris Derzhavets
2010-03-12 21:29         ` Jeremy Fitzhardinge
2010-03-12 22:08           ` Boris Derzhavets
2010-03-12 22:11             ` Jeremy Fitzhardinge
2010-03-12 22:13               ` Boris Derzhavets
2010-03-12 22:22                 ` Jeremy Fitzhardinge
2010-03-15 15:53                   ` Stefano Stabellini
2010-03-15 16:02                     ` Boris Derzhavets
2010-03-15 17:27                   ` Stefano Stabellini
2010-03-15 17:49                     ` Boris Derzhavets
2010-03-15 18:01                       ` Stefano Stabellini

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=4B9FCD46.5090705@goop.org \
    --to=jeremy@goop.org \
    --cc=sheng@linux.intel.com \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=xen-devel@lists.xensource.com \
    /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.