Skip to contentSkip to conversation

x86/xen/time: set the X86_FEATURE_TSC_KNOWN_FREQ flag in xen_tsc_khz()

PATCH Applied Hayato Ohhashi 3 participants 3 messages Jul 21, 2020 – Jul 25, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/xen/time: set the X86_FEATURE_TSC_KNOWN_FREQ flag in xen_tsc_khz()

If the TSC frequency is known from the pvclock page, the TSC frequency does not need to be recalibrated.
We can avoid recalibration by setting X86_FEATURE_TSC_KNOWN_FREQ.

---
 arch/x86/xen/time.c | 1 +
 1 file changed, 1 insertion(+)
arch/x86/xen/time.c +1 -0
index c8897aad13cd..91f5b330dcc6 100644
@@ -39,6 +39,7 @@ static unsigned long xen_tsc_khz(void)
 	struct pvclock_vcpu_time_info *info =
 		&HYPERVISOR_shared_info->vcpu_info[0].time;
 
+	setup_force_cpu_cap(X86_FEATURE_TSC_KNOWN_FREQ);
 	return pvclock_tsc_khz(info);
 }
 
Signature · 1 line
2.23.3
merge bot Applied
#2 lore raw

[tip: x86/timers] x86/xen/time: Set the X86_FEATURE_TSC_KNOWN_FREQ flag in xen_tsc_khz()

In reply to Hayato Ohhashi
The following commit has been merged into the x86/timers branch of tip:

The following commit has been merged into the x86/timers branch of tip:

Commit-ID:     898ec52d2ba05915aaedcdb21bff2e944c883cb8
Gitweb:        https://git.kernel.org/tip/898ec52d2ba05915aaedcdb21bff2e944c883cb8
Author:        Hayato Ohhashi <[email protected]>
AuthorDate:    Tue, 21 Jul 2020 16:12:31 
Committer:     Ingo Molnar <[email protected]>
CommitterDate: Sat, 25 Jul 2020 15:49:41 +02:00

x86/xen/time: Set the X86_FEATURE_TSC_KNOWN_FREQ flag in xen_tsc_khz()

If the TSC frequency is known from the pvclock page, the TSC frequency does not need to be recalibrated.

We can avoid recalibration by setting X86_FEATURE_TSC_KNOWN_FREQ.

---
 arch/x86/xen/time.c | 1 +
 1 file changed, 1 insertion(+)
arch/x86/xen/time.c +1 -0
index c8897aa..91f5b33 100644
@@ -39,6 +39,7 @@ static unsigned long xen_tsc_khz(void)
 	struct pvclock_vcpu_time_info *info =
 		&HYPERVISOR_shared_info->vcpu_info[0].time;
 
+	setup_force_cpu_cap(X86_FEATURE_TSC_KNOWN_FREQ);
 	return pvclock_tsc_khz(info);
 }