Displaying 1 result from an estimated 1 matches for "ns_to_vtsc".
2010 Dec 14
0
[PATCH 1/5] vtdt: Define a new function gtsc_to_gtime()
...sc_parse(const char
}
custom_param("tsc", tsc_parse);
-u64 gtime_to_gtsc(struct domain *d, u64 tsc)
+u64 gtime_to_gtsc(struct domain *d, u64 time)
{
if ( !is_hvm_domain(d) )
- tsc = max_t(s64, tsc - d->arch.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....