search for: vtsc_to_ns

Displaying 1 result from an estimated 1 matches for "vtsc_to_ns".

2010 Dec 14
0
[PATCH 1/5] vtdt: Define a new function gtsc_to_gtime()
....vtsc_offset, 0); - return scale_delta(tsc, &d->arch.ns_to_vtsc); + time = max_t(s64, time - d->arch.vtsc_offset, 0); + return scale_delta(time, &d->arch.ns_to_vtsc); +} + +u64 gtsc_to_gtime(struct domain *d, u64 tsc) +{ + u64 time = scale_delta(tsc, &d->arch.vtsc_to_ns); + + if ( !is_hvm_domain(d) ) + time += d->arch.vtsc_offset; + return time; } void pv_soft_rdtsc(struct vcpu *v, struct cpu_user_regs *regs, int rdtscp) diff -r 373b7357d977 xen/include/asm-x86/time.h --- a/xen/include/asm-x86/time.h Thu Dec 09 22:32:43 2010 +0800 +++ b/xen/inc...