[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] x86: Hyper-V clock source's offset should be signed



On Fri, 20 Dec 2019 at 19:57, Andrew Cooper <andrew.cooper3@xxxxxxxxxx> wrote:
>
> On 20/12/2019 19:47, Wei Liu wrote:
> > Fixes: 685d16bd5 (x86: implement Hyper-V clock source)
> > Signed-off-by: Wei Liu <liuwe@xxxxxxxxxxxxx>
> > ---
> > I discover this stupid mistake when I work on extracting common code
> > from viridian and the clock source implementation.
>
> Does it make a practical difference?
>

Probably not. The specs says that field is signed, so our code should
reflect that.

> > ---
> >  xen/arch/x86/time.c | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/xen/arch/x86/time.c b/xen/arch/x86/time.c
> > index a3c9b927e8..bbcc9b10b8 100644
> > --- a/xen/arch/x86/time.c
> > +++ b/xen/arch/x86/time.c
> > @@ -698,7 +698,8 @@ static int64_t __init init_hyperv_timer(struct 
> > platform_timesource *pts)
> >
> >  static inline uint64_t read_hyperv_timer(void)
>
> Also, this function is only ever accessed via pointer.  The inline can't
> be satisfied at all.
>

I can drop the inline here.

Wei.

> ~Andrew
>
> >  {
> > -    uint64_t scale, offset, ret, tsc;
> > +    uint64_t scale, ret, tsc;
> > +    int64_t offset;
> >      uint32_t seq;
> >      const struct ms_hyperv_tsc_page *tsc_page = hyperv_tsc;
> >
>

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.