From: Hayato Ohhashi <o8@vmm.dev> To: tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, x86@kernel.org Cc: xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org, boris.ostrovsky@oracle.com, jgross@suse.com, sstabellini@kernel.org, Hayato Ohhashi <o8@vmm.dev> Subject: [PATCH] x86/xen/time: set the X86_FEATURE_TSC_KNOWN_FREQ flag in xen_tsc_khz() Date: Tue, 21 Jul 2020 16:12:31 +0000 [thread overview] Message-ID: <20200721161231.6019-1-o8@vmm.dev> (raw) 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
WARNING: multiple messages have this Message-ID (diff)
From: Hayato Ohhashi <o8@vmm.dev> To: tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, x86@kernel.org Cc: jgross@suse.com, Hayato Ohhashi <o8@vmm.dev>, sstabellini@kernel.org, linux-kernel@vger.kernel.org, xen-devel@lists.xenproject.org, boris.ostrovsky@oracle.com Subject: [PATCH] x86/xen/time: set the X86_FEATURE_TSC_KNOWN_FREQ flag in xen_tsc_khz() Date: Tue, 21 Jul 2020 16:12:31 +0000 [thread overview] Message-ID: <20200721161231.6019-1-o8@vmm.dev> (raw) 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
next reply other threads:[~2020-07-21 16:13 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-07-21 16:12 Hayato Ohhashi [this message] 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 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
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20200721161231.6019-1-o8@vmm.dev \ --to=o8@vmm.dev \ --cc=boris.ostrovsky@oracle.com \ --cc=bp@alien8.de \ --cc=jgross@suse.com \ --cc=linux-kernel@vger.kernel.org \ --cc=mingo@redhat.com \ --cc=sstabellini@kernel.org \ --cc=tglx@linutronix.de \ --cc=x86@kernel.org \ --cc=xen-devel@lists.xenproject.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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.