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

Re: [Xen-devel] [PATCH v6 2/2] x86/viridian: Add partition time reference counter MSR support



> -----Original Message-----
> From: Jan Beulich [mailto:JBeulich@xxxxxxxx]
> Sent: 27 August 2014 14:40
> To: Paul Durrant
> Cc: Ian Campbell; Ian Jackson; Stefano Stabellini; xen-devel@xxxxxxxxxxxxx;
> Keir (Xen.org)
> Subject: Re: [PATCH v6 2/2] x86/viridian: Add partition time reference
> counter MSR support
> 
> >>> On 27.08.14 at 15:07, <paul.durrant@xxxxxxxxxx> wrote:
> > +    case VIRIDIAN_MSR_TIME_REF_COUNT:
> > +    {
> > +        uint64_t tsc;
> > +
> > +        if ( !(viridian_feature_mask(d) & HVMPV_time_ref_count) )
> > +            return 0;
> > +
> > +        perfc_incr(mshv_rdmsr_time_ref_count);
> > +        tsc = hvm_get_guest_tsc(pt_global_vcpu_target(d));
> > +        *val = (tsc * 10000ull) / d->arch.tsc_khz;
> 
> There was a very relevant comment on the potential overflow of
> the multiplication here for the previous version, yet you neither
> addressed that verbally nor by adjusting the code.
> 

Ah. Apologies, I missed that comment from Christoph.

  Paul

> Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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