Date: Tue, 03 Sep 2019 14:06:10 -0000 From: Mark Johnston <markj@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r345869 - in stable/10/sys/cddl/dev/dtrace: amd64 i386 Message-ID: <201904040208.x3428bTk045599@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: markj Date: Thu Apr 4 02:08:36 2019 New Revision: 345869 URL: https://svnweb.freebsd.org/changeset/base/345869 Log: MFC r345359, r345384: Don't attempt to measure TSC skew when running as a VM guest. PR: 218452 Modified: stable/10/sys/cddl/dev/dtrace/amd64/dtrace_subr.c stable/10/sys/cddl/dev/dtrace/i386/dtrace_subr.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/dev/dtrace/amd64/dtrace_subr.c ============================================================================== --- stable/10/sys/cddl/dev/dtrace/amd64/dtrace_subr.c Thu Apr 4 02:07:24 2019 (r345868) +++ stable/10/sys/cddl/dev/dtrace/amd64/dtrace_subr.c Thu Apr 4 02:08:36 2019 (r345869) @@ -405,6 +405,9 @@ dtrace_gethrtime_init(void *arg) */ nsec_scale = ((uint64_t)NANOSEC << SCALE_SHIFT) / tsc_f; + if (vm_guest != VM_GUEST_NO) + return; + /* The current CPU is the reference one. */ sched_pin(); tsc_skew[curcpu] = 0; Modified: stable/10/sys/cddl/dev/dtrace/i386/dtrace_subr.c ============================================================================== --- stable/10/sys/cddl/dev/dtrace/i386/dtrace_subr.c Thu Apr 4 02:07:24 2019 (r345868) +++ stable/10/sys/cddl/dev/dtrace/i386/dtrace_subr.c Thu Apr 4 02:08:36 2019 (r345869) @@ -414,6 +414,9 @@ dtrace_gethrtime_init(void *arg) */ nsec_scale = ((uint64_t)NANOSEC << SCALE_SHIFT) / tsc_f; + if (vm_guest != VM_GUEST_NO) + return; + /* The current CPU is the reference one. */ sched_pin(); tsc_skew[curcpu] = 0;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201904040208.x3428bTk045599>