From: Sheng Yang <sheng@linux.intel.com>
To: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Ian Campbell <Ian.Campbell@eu.citrix.com>,
Ian Pratt <Ian.Pratt@eu.citrix.com>,
xen-devel <xen-devel@lists.xensource.com>,
Tim Deegan <Tim.Deegan@citrix.com>,
Keir Fraser <Keir.Fraser@eu.citrix.com>
Subject: Re: Re: [PATCH][v4] PV extension of HVM(hybrid) support in Xen
Date: Tue, 2 Mar 2010 13:04:17 +0800 [thread overview]
Message-ID: <201003021304.17595.sheng@linux.intel.com> (raw)
In-Reply-To: <4B8C9686.40608@goop.org>
On Tuesday 02 March 2010 12:39:34 Jeremy Fitzhardinge wrote:
> On 03/01/2010 07:36 PM, Sheng Yang wrote:
> >> static u64 pvclock_get_nsec_offset(struct pvclock_shadow_time *shadow)
> >> {
> >> u64 delta = native_read_tsc() - shadow->tsc_timestamp;
> >> return scale_delta(delta, shadow->tsc_to_nsec_mul, shadow-
> >> tsc_shift);
> >> }
> >
> > tsc_timestamp take the vcpu beginning at 0, so that's the assumption.
>
> Why would it be 0? Xen sets tsc_timestamp to the current tsc when it
> updates the time parameters, which is whenever the vcpu is scheduled on
> a pcpu (and other times). There's no expectation that the tsc starts
> from 0, since that won't ever be the case.
>
Sorry, I misunderstood. HVM assume it start from 0... PV is following the
native. We set the offset to 0, so that PV tsc is the same as native.
--
regards
Yang, Sheng
next prev parent reply other threads:[~2010-03-02 5:04 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-01 9:43 [PATCH][v4] PV extension of HVM(hybrid) support in Xen Sheng Yang
2010-03-01 10:00 ` Keir Fraser
2010-03-01 10:52 ` Stefano Stabellini
2010-03-01 10:21 ` Tim Deegan
2010-03-01 11:40 ` Sheng Yang
2010-03-02 1:49 ` Jeremy Fitzhardinge
2010-03-02 3:36 ` Sheng Yang
2010-03-02 4:39 ` Jeremy Fitzhardinge
2010-03-02 5:04 ` Sheng Yang [this message]
2010-03-02 5:21 ` Jeremy Fitzhardinge
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=201003021304.17595.sheng@linux.intel.com \
--to=sheng@linux.intel.com \
--cc=Ian.Campbell@eu.citrix.com \
--cc=Ian.Pratt@eu.citrix.com \
--cc=Keir.Fraser@eu.citrix.com \
--cc=Tim.Deegan@citrix.com \
--cc=jeremy@goop.org \
--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 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).