All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86/xen/time: set the X86_FEATURE_TSC_KNOWN_FREQ flag in xen_tsc_khz()
@ 2020-07-21 16:12 ` Hayato Ohhashi
  0 siblings, 0 replies; 5+ messages in thread
From: Hayato Ohhashi @ 2020-07-21 16:12 UTC (permalink / raw)
  To: tglx, mingo, bp, x86
  Cc: xen-devel, linux-kernel, boris.ostrovsky, jgross, sstabellini,
	Hayato Ohhashi

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.

Signed-off-by: Hayato Ohhashi <o8@vmm.dev>
---
 arch/x86/xen/time.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/x86/xen/time.c b/arch/x86/xen/time.c
index c8897aad13cd..91f5b330dcc6 100644
--- a/arch/x86/xen/time.c
+++ b/arch/x86/xen/time.c
@@ -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);
 }
 
-- 
2.23.3


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH] x86/xen/time: set the X86_FEATURE_TSC_KNOWN_FREQ flag in xen_tsc_khz()
@ 2020-07-21 16:12 ` Hayato Ohhashi
  0 siblings, 0 replies; 5+ messages in thread
From: Hayato Ohhashi @ 2020-07-21 16:12 UTC (permalink / raw)
  To: tglx, mingo, bp, x86
  Cc: jgross, Hayato Ohhashi, sstabellini, linux-kernel, xen-devel,
	boris.ostrovsky

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.

Signed-off-by: Hayato Ohhashi <o8@vmm.dev>
---
 arch/x86/xen/time.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/x86/xen/time.c b/arch/x86/xen/time.c
index c8897aad13cd..91f5b330dcc6 100644
--- a/arch/x86/xen/time.c
+++ b/arch/x86/xen/time.c
@@ -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);
 }
 
-- 
2.23.3



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] x86/xen/time: set the X86_FEATURE_TSC_KNOWN_FREQ flag in xen_tsc_khz()
  2020-07-21 16:12 ` Hayato Ohhashi
@ 2020-07-21 23:33   ` Boris Ostrovsky
  -1 siblings, 0 replies; 5+ messages in thread
From: Boris Ostrovsky @ 2020-07-21 23:33 UTC (permalink / raw)
  To: Hayato Ohhashi, tglx, mingo, bp, x86
  Cc: xen-devel, linux-kernel, jgross, sstabellini

On 7/21/20 12:12 PM, Hayato Ohhashi wrote:
> 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.
>
> Signed-off-by: Hayato Ohhashi <o8@vmm.dev>


Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] x86/xen/time: set the X86_FEATURE_TSC_KNOWN_FREQ flag in xen_tsc_khz()
@ 2020-07-21 23:33   ` Boris Ostrovsky
  0 siblings, 0 replies; 5+ messages in thread
From: Boris Ostrovsky @ 2020-07-21 23:33 UTC (permalink / raw)
  To: Hayato Ohhashi, tglx, mingo, bp, x86
  Cc: jgross, xen-devel, sstabellini, linux-kernel

On 7/21/20 12:12 PM, Hayato Ohhashi wrote:
> 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.
>
> Signed-off-by: Hayato Ohhashi <o8@vmm.dev>


Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>




^ permalink raw reply	[flat|nested] 5+ messages in thread

* [tip: x86/timers] x86/xen/time: Set the X86_FEATURE_TSC_KNOWN_FREQ flag in xen_tsc_khz()
  2020-07-21 16:12 ` Hayato Ohhashi
  (?)
  (?)
@ 2020-07-25 13:53 ` tip-bot2 for Hayato Ohhashi
  -1 siblings, 0 replies; 5+ messages in thread
From: tip-bot2 for Hayato Ohhashi @ 2020-07-25 13:53 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: Hayato Ohhashi, Ingo Molnar, Boris Ostrovsky, x86, LKML

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 <o8@vmm.dev>
AuthorDate:    Tue, 21 Jul 2020 16:12:31 
Committer:     Ingo Molnar <mingo@kernel.org>
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.

Signed-off-by: Hayato Ohhashi <o8@vmm.dev>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Link: https://lore.kernel.org/r/20200721161231.6019-1-o8@vmm.dev
---
 arch/x86/xen/time.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/x86/xen/time.c b/arch/x86/xen/time.c
index c8897aa..91f5b33 100644
--- a/arch/x86/xen/time.c
+++ b/arch/x86/xen/time.c
@@ -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);
 }
 

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-07-25 13:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-21 16:12 [PATCH] x86/xen/time: set the X86_FEATURE_TSC_KNOWN_FREQ flag in xen_tsc_khz() Hayato Ohhashi
2020-07-21 16:12 ` Hayato Ohhashi
2020-07-21 23:33 ` Boris Ostrovsky
2020-07-21 23:33   ` Boris Ostrovsky
2020-07-25 13:53 ` [tip: x86/timers] x86/xen/time: Set " tip-bot2 for Hayato Ohhashi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.