>>> On 28.02.16 at 13:54, <haozhong.zh...@intel.com> wrote: > --- a/xen/arch/x86/hvm/hvm.c > +++ b/xen/arch/x86/hvm/hvm.c > @@ -333,6 +333,23 @@ u64 hvm_get_tsc_scaling_ratio(u32 gtsc_khz) > return ratio > max_ratio ? 0 : ratio; > } > > +u64 hvm_scale_tsc(const struct domain *d, u64 tsc) > +{ > + u64 ratio = d->arch.hvm_domain.tsc_scaling_ratio; > + u64 dummy; > + > + if ( ratio == hvm_default_tsc_scaling_ratio ) > + return tsc; > + > + /* tsc = (tsc * ratio) >> hvm_funcs.tsc_scaling.ratio_frac_bits */ > + asm ( "mulq %[ratio]; shrdq %[frac],%%rdx,%[tsc]" > + : [tsc] "+a" (tsc), "=d" (dummy)
Is mixing named and positional asm() operands supported by all gcc versions we care about? Also strictly speaking "=d" needs to be switched to "=&d". Jan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel