From: "Jan Beulich" Subject: Re: [PATCH v11 2/2] x86/viridian: Add partition time reference counter MSR support Date: Wed, 17 Sep 2014 11:45:13 +0100 Message-ID: <541982590200007800035A17@mail.emea.novell.com> References: <1410887929-7748-1-git-send-email-paul.durrant@citrix.com> <1410887929-7748-3-git-send-email-paul.durrant@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1410887929-7748-3-git-send-email-paul.durrant@citrix.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Paul Durrant Cc: Keir Fraser , Ian Campbell , Stefano Stabellini , Christoph Egger , Ian Jackson , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org >>> On 16.09.14 at 19:18, wrote: > + case VIRIDIAN_MSR_TIME_REF_COUNT: > + { > + uint64_t tsc; > + struct time_scale tsc_to_ns; > + > + 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)); > + > + /* convert tsc to count of 100ns periods */ > + set_time_scale(&tsc_to_ns, (uint64_t)d->arch.tsc_khz * 1000ul); As I keep pushing a private note for when this can eventually be applied from one revision to the next - should you have to do another round, could I ask you to drop the pointless cast here? Jan