WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] Re: [PATCH][v4] PV extension of HVM(hybrid) support in X

To: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Subject: Re: [Xen-devel] Re: [PATCH][v4] PV extension of HVM(hybrid) support in Xen
From: Sheng Yang <sheng@xxxxxxxxxxxxxxx>
Date: Tue, 2 Mar 2010 13:04:17 +0800
Cc: Ian Campbell <Ian.Campbell@xxxxxxxxxxxxx>, Ian Pratt <Ian.Pratt@xxxxxxxxxxxxx>, xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, Tim Deegan <Tim.Deegan@xxxxxxxxxx>, Keir Fraser <Keir.Fraser@xxxxxxxxxxxxx>
Delivery-date: Mon, 01 Mar 2010 21:03:58 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4B8C9686.40608@xxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: Intel Opensource Technology Center
References: <201003011743.41341.sheng@xxxxxxxxxxxxxxx> <201003021136.02590.sheng@xxxxxxxxxxxxxxx> <4B8C9686.40608@xxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.12.2 (Linux/2.6.31-19-generic; KDE/4.3.2; x86_64; ; )
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

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel