mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
x86/time: gtsc_to_gtime() is HVM-only
Omit the function when HVM=n. With that the !HVM logic can also go away; leave an assertion. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Roger Pau Monné <roger.pau@citrix.com>
This commit is contained in:
1 parent
b70825ee3a
commit
91c5bbbb91
1 file changed
+4
-5
+4
-5
@@ -2837,14 +2837,13 @@ uint64_t gtime_to_gtsc(const struct domain *d, uint64_t time)
|
||||
return scale_delta(time, &d->arch.ns_to_vtsc);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_HVM
|
||||
uint64_t gtsc_to_gtime(const struct domain *d, uint64_t tsc)
|
||||
{
|
||||
u64 time = scale_delta(tsc, &d->arch.vtsc_to_ns);
|
||||
|
||||
if ( !is_hvm_domain(d) )
|
||||
time += d->arch.vtsc_offset;
|
||||
return time;
|
||||
ASSERT(is_hvm_domain(d));
|
||||
return scale_delta(tsc, &d->arch.vtsc_to_ns);
|
||||
}
|
||||
#endif /* CONFIG_HVM */
|
||||
|
||||
uint64_t pv_soft_rdtsc(const struct vcpu *v, const struct cpu_user_regs *regs)
|
||||
{
|
||||
|
||||