[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2 6/6] x86: implement Hyper-V clock source
> -----Original Message----- > From: Wei Liu <wl@xxxxxxx> > Sent: 18 December 2019 22:21 > To: Michael Kelley <mikelley@xxxxxxxxxxxxx> > Cc: Durrant, Paul <pdurrant@xxxxxxxxxx>; Wei Liu <wl@xxxxxxx>; Xen > Development List <xen-devel@xxxxxxxxxxxxxxxxxxxx>; Wei Liu > <liuwe@xxxxxxxxxxxxx>; Jan Beulich <jbeulich@xxxxxxxx>; Andrew Cooper > <andrew.cooper3@xxxxxxxxxx>; Roger Pau Monné <roger.pau@xxxxxxxxxx> > Subject: Re: [PATCH v2 6/6] x86: implement Hyper-V clock source > > On Wed, 18 Dec 2019 at 20:24, Michael Kelley <mikelley@xxxxxxxxxxxxx> > wrote: > > > > From: Durrant, Paul <pdurrant@xxxxxxxxxx> Sent: Wednesday, December 18, > 2019 7:24 AM > > > > > > From: Wei Liu <wei.liu.xen@xxxxxxxxx> On Behalf Of Wei Liu > > > > Sent: 18 December 2019 14:43 > > > > [snip] > > > > > > + > > > > +static inline uint64_t read_hyperv_timer(void) > > > > +{ > > > > + uint64_t scale, offset, ret, tsc; > > > > + uint32_t seq; > > > > + const struct ms_hyperv_tsc_page *tsc_page = hyperv_tsc; > > > > + > > > > + do { > > > > + seq = tsc_page->tsc_sequence; > > > > + > > > > + /* Seq 0 is special. It means the TSC enlightenment is not > > > > + * available at the moment. The reference time can only be > > > > + * obtained from the Reference Counter MSR. > > > > + */ > > > > + if ( seq == 0 ) > > > > > > Older versions of the spec used to use 0xFFFFFFFF I think, although > when I look again they > > > seem to have been retro-actively fixed. In any case I think you should > treat both > > > 0xFFFFFFFF and 0 as invalid. > > > > FWIW, the 0xFFFFFFFF was just a bug in the spec. Hyper-V > implementations only > > set the value to 0 to indicate invalid. The equivalent Linux code > checks only for 0. > > > > Thanks for chiming in, Michael. > > In that case I will submit a fix to change Xen's viridian code to > remove the wrong value there. If no consuming version of Windows is going to be upset seeing all-Fs then that's fine. Thanks for the clarification. Cheers, Paul _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |