[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
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. Wei. > Michael _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |