public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] kvm/x86: rename kvm's read_tsc() as kvm_read_host_tsc()
@ 2022-02-18 22:18 Pete Swain
  2022-02-18 22:18 ` [PATCH 2/2] timers: retpoline mitigation for time funcs Pete Swain
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Pete Swain @ 2022-02-18 22:18 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86
  Cc: H. Peter Anvin, Paolo Bonzini, Sean Christopherson,
	Vitaly Kuznetsov, Wanpeng Li, Jim Mattson, Joerg Roedel,
	John Stultz, Stephen Boyd, Maciej W. Rozycki, Johan Hovold,
	Feng Tang, Paul E. McKenney, Juergen Gross, linux-kernel, kvm,
	Pete Swain

Avoid clash with host driver's INDIRECT_CALLABLE_SCOPE read_tsc()

Signed-off-by: Pete Swain <swine@google.com>
---
 arch/x86/kvm/x86.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 641044db415d..0424d77cd214 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -2632,7 +2632,7 @@ static inline void adjust_tsc_offset_host(struct kvm_vcpu *vcpu, s64 adjustment)
 
 #ifdef CONFIG_X86_64
 
-static u64 read_tsc(void)
+static u64 kvm_read_host_tsc(void)
 {
 	u64 ret = (u64)rdtsc_ordered();
 	u64 last = pvclock_gtod_data.clock.cycle_last;
@@ -2674,7 +2674,7 @@ static inline u64 vgettsc(struct pvclock_clock *clock, u64 *tsc_timestamp,
 		break;
 	case VDSO_CLOCKMODE_TSC:
 		*mode = VDSO_CLOCKMODE_TSC;
-		*tsc_timestamp = read_tsc();
+		*tsc_timestamp = kvm_read_host_tsc();
 		v = (*tsc_timestamp - clock->cycle_last) &
 			clock->mask;
 		break;
-- 
2.35.1.473.g83b2b277ed-goog


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

end of thread, other threads:[~2022-04-11 11:11 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-18 22:18 [PATCH 1/2] kvm/x86: rename kvm's read_tsc() as kvm_read_host_tsc() Pete Swain
2022-02-18 22:18 ` [PATCH 2/2] timers: retpoline mitigation for time funcs Pete Swain
2022-04-10 12:14   ` Thomas Gleixner
2022-04-11  9:21     ` Thomas Gleixner
2022-04-11 11:07     ` Thomas Gleixner
2022-02-18 22:49 ` [PATCH 1/2] kvm/x86: rename kvm's read_tsc() as kvm_read_host_tsc() Jim Mattson
2022-02-19  8:40 ` Paolo Bonzini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox