Re: [Xen-devel] [PATCH] xen/time: fix gtime_to_gtsc for vtsc=1 PV guests

2016-04-28 Thread Andrew Cooper
On 25/04/16 12:18, Stefano Stabellini wrote: > From: Jan Beulich > > For vtsc=1 PV guests, rdtsc is trapped and calculated from get_s_time() > using gtime_to_gtsc. Similarly the tsc_timestamp, part of struct > vcpu_time_info, is calculated from stime_local_stamp using > gtime_to_gtsc. > > However

Re: [Xen-devel] [PATCH] xen/time: fix gtime_to_gtsc for vtsc=1 PV guests

2016-04-25 Thread Wei Liu
On Mon, Apr 25, 2016 at 06:05:50AM -0600, Jan Beulich wrote: > >>> On 25.04.16 at 13:18, wrote: > > From: Jan Beulich > > > > For vtsc=1 PV guests, rdtsc is trapped and calculated from get_s_time() > > using gtime_to_gtsc. Similarly the tsc_timestamp, part of struct > > vcpu_time_info, is calcul

Re: [Xen-devel] [PATCH] xen/time: fix gtime_to_gtsc for vtsc=1 PV guests

2016-04-25 Thread Stefano Stabellini
On Mon, 25 Apr 2016, Jan Beulich wrote: > >>> On 25.04.16 at 13:18, wrote: > > From: Jan Beulich > > > > For vtsc=1 PV guests, rdtsc is trapped and calculated from get_s_time() > > using gtime_to_gtsc. Similarly the tsc_timestamp, part of struct > > vcpu_time_info, is calculated from stime_local

Re: [Xen-devel] [PATCH] xen/time: fix gtime_to_gtsc for vtsc=1 PV guests

2016-04-25 Thread Jan Beulich
>>> On 25.04.16 at 13:18, wrote: > From: Jan Beulich > > For vtsc=1 PV guests, rdtsc is trapped and calculated from get_s_time() > using gtime_to_gtsc. Similarly the tsc_timestamp, part of struct > vcpu_time_info, is calculated from stime_local_stamp using > gtime_to_gtsc. > > However gtime_to_

[Xen-devel] [PATCH] xen/time: fix gtime_to_gtsc for vtsc=1 PV guests

2016-04-25 Thread Stefano Stabellini
From: Jan Beulich For vtsc=1 PV guests, rdtsc is trapped and calculated from get_s_time() using gtime_to_gtsc. Similarly the tsc_timestamp, part of struct vcpu_time_info, is calculated from stime_local_stamp using gtime_to_gtsc. However gtime_to_gtsc can return 0, if time < vtsc_offset, which ca