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: Sheng Yang <sheng@xxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] Re: [PATCH][v4] PV extension of HVM(hybrid) support in Xen
From: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Date: Mon, 01 Mar 2010 20:39:34 -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 20:40:18 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <201003021136.02590.sheng@xxxxxxxxxxxxxxx>
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>
References: <201003011743.41341.sheng@xxxxxxxxxxxxxxx> <201003011940.50685.sheng@xxxxxxxxxxxxxxx> <4B8C6EC3.2020307@xxxxxxxx> <201003021136.02590.sheng@xxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.7) Gecko/20100120 Fedora/3.0.1-1.fc12 Lightning/1.0b2pre Thunderbird/3.0.1
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.

    J

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